Calling Extraterrestrial Intelligence Again Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3993    Accepted Submission(s): 2097 Problem Description A message from humans to extraterrestrial in…
这题wa了很多词,题目本身很简单,把a/b搞反了,半天才检查出来. #include <stdio.h> #include <string.h> #include <math.h> ]; int main() { int i, j, q, p, maxi, maxj, max; double m, a, b, n, tmp1, tmp2; memset(isPrime, , sizeof(isPrime)); isPrime[] = isPrime[] = ; ; i&…
Calling Extraterrestrial Intelligence Again Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 11211   Accepted: 4356 Description A message from humans to extraterrestrial intelligence was sent through the Arecibo radio telescope in Puerto…
Calling Extraterrestrial Intelligence Again Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 4083    Accepted Submission(s): 2140 Problem Description A message from humans to extraterrestrial in…
题意:给你数m,a,b,假设有数p,q,满足p*q<=m同时a/b<=p/q<=1,求当p*q最大的p和q的值 方法:暴力枚举 -_-|| and 优化范围 我们可以注意到在某一个m值得情况下,有一些小于m的值的质数根本不可能去到 以m=1680 a=5 b=16来举例,假设当前枚举的质数为x 那么既然选了这个x必然另外一个质数不可能小于x*5/16所以就可以得到一个方程 5/16*x^2<=1680 这样可以解出x=73.....(取整) #include <iostrea…
思路: 1.暴力枚举每种面值的张数,将可以花光的钱记录下来.每次判断n是否能够用光,能则输出0,不能则向更少金额寻找是否有能够花光的.时间复杂度O(n) 2.350 = 200 + 150,买350的道具可用一个150和200的代替,那么直接考虑200和150的道具即可.首先全部买150的道具,剩下的金额为x,可以看成t = x / 50张50的钱加上r = x % 50的钱.如果t <= n / 150,那么说明这些50的都可以和一个150的买200的道具,否则会剩下一些50的没法用.假设最后…
Hou Yi's secret Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1881    Accepted Submission(s): 450 Problem Description Long long ago, in the time of Chinese emperor Yao, ten suns rose into the…
传送门 Fxx and string Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 1007    Accepted Submission(s): 422 Description Problem DescriptionYoung theoretical computer scientist Fxx get a string which…
题目链接 题意:给平均成绩和科目数,求可能的最大学分和最小学分. 分析: 枚举一下,可以达到复杂度可以达到10^4,我下面的代码是10^5,可以把最后一个循环撤掉. 刚开始以为枚举档次的话是5^10,但是这个又不要求顺序,所以只是枚举个数就行了.. #include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> #include <cmath> #includ…
jrMz and angles 题目链接: http://acm.hust.edu.cn/vjudge/contest/123316#problem/E Description jrMz has two types of angles, one type of angle is an interior angle of -sided regular polygon, and the other type of angle is an interior angle of -sided regula…