题意: 求H的最大值,  H是指存在H篇论文,这H篇被引用的次数都大于等于H次. 思路:题意得,  最多只有N遍论文,所以H的最大值为N, 常识得知H的最小值为0. 所以H的答案在[0,N]之间,二分搜一下,如果满足就提高下限,不满足则降低上限. 嗯就这样!!!! AC code: #include<bits/stdc++.h> using namespace std; int n; vector<); int main() { bool check(int t); while(scan…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6281 题意: 根据已给出的式子,进行排序,然后输出排完序后原先的下表. 题解:用结构体保存,在用结构体排序,利用stable_sort()稳定排序.因为会爆long long ,所以对式子进行转换. 代码: #include<bits/stdc++.h> using namespace std; struct node{ int n; long long a,b,c; friend bool op…
HDU – 6282 http://acm.hdu.edu.cn/showproblem.php?pid=6282 by Hzu_Tested 题意:给出两个字符串S和T,只由a,b,c三种字符组成(不为空串,长度不一定相同,不一定包含所有字符).对字符串S可以进行几种操作:在任意位置添加/删除字符串aa,bb,abab.问字符串S是否能通过以上几种操作变成T,输出Yes/No. 思路:字符串变化的问题,先找出所有可行的操作:添加/删除aa,bb,abab,即只能添加/删除偶数个a/b,无法添加…
题意: 给出N个小时,分配这些小时去写若干份论文,若用1小时写一份论文,该论文会被引用A次,新写一篇论文的话,全面的论文会被新论文引用一次. 找最大的H,H是指存在H遍论文,而且这些论文各被引用大于H次. 思路: 第一步,我们要想怎么样分配这些时间,毫无疑问,当N个小时写N份论文时为最优方案. 证明如下:  如果一开始的A>数量的话,就一直写新的:(没疑问吧!!!,如果A>数量,你还写旧的不是浪费时间吗???)  然后我们就会到一个分水岭 到达 A=数量(这时还是可以接受的,因为这里的A也算进…
A water problem 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5832 Description Two planets named Haha and Xixi in the universe and they were created with the universe beginning. There is 73 days in Xixi a year and 137 days in Haha a year. Now you k…
D-City Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 18    Accepted Submission(s): 15 Problem Description Luxer is a really bad guy. He destroys everything he met. One day Luxer went to D-city…
Barricade Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1418    Accepted Submission(s): 417 Problem Description The empire is under attack again. The general of empire is planning to defend h…
u Calculate e Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 28686    Accepted Submission(s): 12762 Problem Description A simple mathematical formula for e is where n is allowed to go to infini…
题目 //行开始看被吓一跳,那么大,没有头绪, //看了解题报告,发现这是一道大大大的水题,,,,,//2009 = 7 * 7 * 41//对2009分解,看它有哪些质因子,它最大的质因子是41,那么对于大于等于41的数,直接输出0就行了. #include<stdio.h> #include<string.h> #include<algorithm> using namespace std; int main() { int n; while(scanf("…
War on Weather Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 300    Accepted Submission(s): 162 Problem Description After an unprovoked hurricane attack on the south shore, Glorious Warrior ha…