随笔分类 - ACM — STL库
摘要:http://www.bnuoj.com/bnuoj/problem_show.php?pid=33648【题解】:结果先对MOD*2取模,才能得到结果是否是正确的奇偶问题,得到最后结果之后再对MOD取模。。。【code】: 1 #include 2 #include 3 #include 4 #include 5 #include 6 7 using namespace std; 8 #define MOD 1000000007 9 10 struct Nod11 {12 int parent;13 long long sum;14 int edge;15...
阅读全文
摘要:http://acm.csu.edu.cn/OnlineJudge/problem.php?id=13061306: ManorTime Limit: 1 Sec Memory Limit: 128 MB Submit: 125 Solved: 35 [Submit][Status][Web Board]DescriptionBob有n个正整数,他将这n个整数根据大小划分成两部分。对于小于等于k的整数放在集合A中,其余的放在集合B中。每次他从集合B中取出一个最大的值,将其变成0放入A集合中。然后将A集合中所有的元素都增加a,如果此时A中元素大于k,那么要将该元素放入B中,同时将B集合中剩余的元
阅读全文
摘要:http://poj.org/problem?id=3013Big Christmas TreeTime Limit:3000MSMemory Limit:131072KTotal Submissions:19009Accepted:4048DescriptionChristmas is coming to KCM city. Suby the loyal civilian in KCM city is preparing a big neat Christmas tree. The simple structure of the tree is shown in right picture.
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=3325Arithmetically ChallengedTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 331Accepted Submission(s): 139Problem DescriptionChallenge 24 is a popular mathematics game used in many grade schools. In each g
阅读全文
摘要:题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=1381Crazy SearchTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1178Accepted Submission(s): 459Problem DescriptionMany people like to solve hard puzzles some of which may lead them to madness. One suc
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=4287Problem Description We all use cell phone today. And we must be familiar with the intelligent English input method on the cell phone. To be specific, the number buttons may correspond to some English letters respectively, as shown below: 2 : a, b, c3 :..
阅读全文

浙公网安备 33010602011771号