摘要:Super Jumping! Jumping! Jumping!Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 23328Accepted Subm...
阅读全文
摘要:Crossed MatchingsTime Limit: 2 Seconds Memory Limit: 65536 KBThere are two rows of positive integer numbers. We can draw one line segment between any...
阅读全文
摘要:Anniversary partyTime Limit:1000MSMemory Limit:32768KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionThere is going to be a p...
阅读全文
摘要:DescriptionQuestion 1: Is Bigger Smarter?The ProblemSome people think that the bigger an elephant is, the smarter it is. To disprove this, you want to...
阅读全文
摘要:DescriptionUnidirectional TSPBackgroundProblems that require minimum paths through some domain appear in many different areas of computer science. For...
阅读全文
摘要:DescriptionCutting SticksYou have to cut a wood stick into pieces. The most affordable company, The Analog Cutting Machinery, Inc. (ACM), charges mone...
阅读全文
摘要:DescriptionStacking BoxesBackgroundSome concepts in Mathematics and Computer Science are simple in one or two dimensions but become more complex when ...
阅读全文
摘要:Jzzhu and NumbersTime Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionJzzhu havennon-negative...
阅读全文
摘要:Dudu is a very starving possum. He currently stands in the first shelf of a fridge. This fridge iscomposed of N shelves, and each shelf has a number Q...
阅读全文
摘要:An Easy GameTime Limit: 2 Seconds Memory Limit: 65536 KBOne day, Edward and Flandre play a game. Flandre will show two 01-strings s1 and s2, the leng...
阅读全文
摘要:Divide ChocolateTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1632Accepted Submission(s): 765Pro...
阅读全文
摘要:题目大意:一个字符串,可以分解成若干英语单词的连接(单词可以重复使用),求有多少种方法?#include#include#include#includeusing namespace std;const int maxl=300005;const int maxwn=4005;const int maxwl=105;const int MOD=20071027;const int maxnode=400005;const int sigma_size=26;struct Trie{ int ch[maxnode][sigma_size]; int val[maxnode]; ...
阅读全文
摘要:Good NumbersTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 603Accepted Submission(s): 221 Problem DescriptionIf we sum up every digit of a number and the result can be exactly divided by 10, we say this number is a good number. You are required t
阅读全文
摘要:题目大意:给一个正整数N,每次可以在不超过N的素数中随机选择一个P,如果P是N的约数,则把N变成N/p,否则N不变,问平均情况下需要多少次随机选择,才能把N变成1?分析:根据数学期望的线性和全期望公式可以为每个状态列出一个方程,例如: f(x)=1+f(6)*1/3+f(3)*1/3+f(2)*1/3等式右边的最前面的“1”是指第一次转移,而后面的几项是后续的转移,用全期望公式展开,一般地,设不超过x的素数有p个,其中有g个是x的因子,则f(x)=1+f(x)*(1-g/p)+Σf(x/y)/p边界f(1)=0。移项后整理得f(x)=(Σf(x/y)+p)/g因为x/y#include#inc
阅读全文