【模拟】【set】hdu 4789 ICPC Ranking】的更多相关文章

写了一晚上,TLE到死,我选择GG 喵的好像还是前几年我校出的题,这整场都……tm…… 改日在战 /*TLE代码*/ #include<cstdio> #include<vector> #include<string> #include<cstring> #include<map> #include<algorithm> #include<iostream> #include<set> int e; using…
Relative atomic mass Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 66    Accepted Submission(s): 59 Problem Description Relative atomic mass is a dimensionless physical quantity, the ratio of…
Football Games Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 802    Accepted Submission(s): 309 Problem Description A mysterious country will hold a football world championships---Abnormal Cup…
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5491 题目大意: 一个数D(0<=D<231),求比D大的第一个满足:二进制下1个个数在[s1,s2]范围内.D已经满足[s1,s2]. 题目思路: [贪心][模拟] 首先将这个数转成二进制统计总共1的个数s,再求出末尾连续0和1的个数n0,n1. 如果最后一位是0: s=s2,那么为了保证s<s2且答案>D,先设ans=d+lowbit(d),此时满足了新的s<s2且答案&g…
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5774 题目大意: 已知1946~2015每一年赢得人是谁,给n个名字,问赢了多少次. 题目思路: [模拟] 打个表就好. #include<stdio.h> #include<string.h> ][]= {"Cleveland Cavaliers", "Golden State Warriors", "San Antonio Spu…
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5762 题目大意: 给n个点,坐标范围0~m(n,m<=105),求是否存在2个点对满足哈夫曼距离相等. 题目思路: [模拟] 乍一看n2绝对T了,但是细想之下发现,坐标范围只有105,那么哈夫曼距离最多就2x105种,所以当循环超出这个范围时肯定能找到解(抽屉原理). // //by coolxxx // #include<iostream> #include<algorithm&g…
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5752 题目大意: 定义f(n)=⌊√n⌋,fy(n)=f(fy-1(n)),求y使得fy(n)=1.如果y>5输出TAT.(n<10100) 题目思路: [模拟] 5层迭代是232,所以特判一下层数是5的,其余开根号做.注意数据有0. 队友写的. #include<stdio.h> #include<string.h> #include<math.h> int…
Problem Description The International Clown and Pierrot Competition (ICPC), is one of the most distinguished and also the most popular events on earth in the show business. One of the unique features of this contest is the great number of judges that…
任务介绍 你的任务是模拟n个程序的并行运算.(按照输入编号为1~n)的并行执行. 代码实现 #define LOCAL #include<bits/stdc++.h> using namespace std; int main(){ #ifdef LOCAL freopen("data.in","r",stdin); freopen("data.out","w",stdout); #endif // LOCAL i…
Alisha’s Party Time Limit: 3000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 7971    Accepted Submission(s): 1833 Description Princess Alisha invites her friends to come to her birthday party. Each of her f…