摘要:The sum problemTime Limit: 5000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 9078Accepted Submission(s): 2776Problem DescriptionGiven a sequence 1,2,3,......N, your job is to calculate all the possible sub-sequences that the sum of the sub-sequence is M.InputInp
阅读全文
摘要:A+B ComingTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3359Accepted Submission(s): 2087Problem DescriptionMany classmates said to me that A+B is must needs.If you can’t AC this problem, you would invite me for night meal. ^_^InputInput may conta
阅读全文
摘要:Digital RootsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 29353Accepted Submission(s): 8974Problem DescriptionThe digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then tha
阅读全文
摘要:当n为3时,我们在验证xxx定律的过程中会得到一个序列,3,5,8,4,2,1,将3称为关键数,5,8,4,2称为覆盖数。现在输入n个数字a[i],根据关键数与覆盖数的理论,我们只需要验证其中部分数就可以确定所有数满足xxx定律,输出输入的n个数中的关键数。如果其中有多个关键数的话按照其输入顺序的逆序输出。Input输入数据包含多个用例,每个用例首先包含一个整数n,然后接下来一行有n个整数a[i],其中:1#include #include using namespacestd;boolh[200000];intmain(){ intn,m,i,k,a[503],b[503]; while(s
阅读全文