10 2017 档案
摘要:DreamGrid has a nonnegative integer n . He would like to divide n into m nonnegative integers a1,a2,...am and minimizes their bitwise or (i.e.a1+a2+..
阅读全文
摘要:Prime Distance Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 19635 Accepted: 5273 Description The branch of mathematics called number the
阅读全文
摘要:C. Short Program time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Petya learned a new pro
阅读全文
摘要:题目链接:http://codeforces.com/gym/101201
阅读全文
摘要:题目链接:http://codeforces.com/gym/101158/attachments
阅读全文
摘要:A New Change Problem Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 533 Accepted Submission(s):
阅读全文
摘要:Wolf and Rabbit Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9060 Accepted Submission(s): 4612
阅读全文
摘要:The Embarrassed Cryptographer Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 15069 Accepted: 4132 Description The young and very promising
阅读全文
摘要:Cow Sorting Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 7587 Accepted: 2982 Description Farmer John's N (1 ≤ N ≤ 10,000) cows are lined
阅读全文
摘要:计数排序就是利用空间换时间,时间复杂度O(n+k) n是元素个数,k是最大数的个数; 统计每个数比他小的有多少,比如比a[i]小的有x个,那么a[i]应该排在x+1的位置 代码:
阅读全文
摘要:EXTENDED LIGHTS OUT Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 11815 Accepted: 7577 Description In an extended version of the game Lig
阅读全文
摘要:2038: [2009国家集训队]小Z的袜子(hose) Description 作为一个生活散漫的人,小Z每天早上都要耗费很久从一堆五颜六色的袜子中找出一双来穿。终于有一天,小Z再也无法忍受这恼人的找袜子过程,于是他决定听天由命…… 具体来说,小Z把这N只袜子从1到N编号,然后从编号L到R(L 尽
阅读全文
摘要:2301: [HAOI2011]Problem b Description 对于给出的n个询问,每次求有多少个数对(x,y),满足a≤x≤b,c≤y≤d,且gcd(x,y) = k,gcd(x,y)函数为x和y的最大公约数。 Input 第一行一个整数n,接下来n行每行五个整数,分别表示a、b、c、
阅读全文
摘要:C. The Intriguing Obsession time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output — This is not
阅读全文
摘要:GCD Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 12935 Accepted Submission(s): 4905 Problem De
阅读全文