随笔分类 -  ACM—快速幂

摘要:If x < 10 f(x) = x.If x >= 10 f(x) = a0 * f(x-1) + a1 * f(x-2) + a2 * f(x-3) + …… + a9 * f(x-10);And ai(0<=i<=9) can only be 0 or 1 . Sample Input 10 阅读全文
posted @ 2016-05-06 12:00 御心飞行 阅读(453) 评论(0) 推荐(0)
摘要:Number Sequence Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 147964 Accepted Submission(s): 35 阅读全文
posted @ 2016-05-06 11:44 御心飞行 阅读(321) 评论(0) 推荐(0)
摘要:How many ways?? Sample Input 4 4 //n个点,m条路径0 1 //s->t可通0 21 32 32 //询问数0 3 2 //从0到3走两条路可到的方案有多少种0 3 33 60 11 00 22 01 22 121 2 10 1 30 0 4 4 //n个点,m条路 阅读全文
posted @ 2016-05-06 10:34 御心飞行 阅读(517) 评论(0) 推荐(0)
摘要:Blocks Input The first line of the input contains an integer T(1≤T≤100), the number of test cases. Each of the next T lines contains an integer N(1≤N≤ 阅读全文
posted @ 2016-05-05 17:03 御心飞行 阅读(206) 评论(0) 推荐(0)
摘要:Tr A Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4166 Accepted Submission(s): 3109 Problem De 阅读全文
posted @ 2016-05-05 16:03 御心飞行 阅读(432) 评论(0) 推荐(0)
摘要:本原串 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1091 Accepted Submission(s): 350 Problem Desc 阅读全文
posted @ 2016-05-05 15:36 御心飞行 阅读(643) 评论(0) 推荐(0)