http://lightoj.com/volume_showproblem.php?problem=1214 这就是一道简单的大数取余。 还想还用到了同余定理: 所谓的同余,顾名思义,就是许多的数被一个数d去除,有相同的余数。d数学上的称谓为模。如a=6,b=1,d=5,则我们说a和b是模d同余的。 ...
分类:
其他好文 时间:
2016-06-01 16:50:18
阅读次数:
376
1088 - Points in Segments PDF (English) Statistics ForumTime Limit: 2 second(s) Memory Limit: 32 MBGiven n points (1 dimensional) and q segments, you ...
分类:
其他好文 时间:
2016-06-01 13:10:37
阅读次数:
216
http://lightoj.com/volume_showproblem.php?problem=1245 题目大意:一个数n除以1到n之和 分析:暴力肯定不行,我们可以先求1~sqrt(n)之间的每个数的个数,然后再求n除以1~sqrt(n)之间的数的和 这样算下来就只有2*sqrt(n)的复杂 ...
分类:
其他好文 时间:
2016-05-31 22:25:50
阅读次数:
271
http://lightoj.com/volume_showproblem.php?problem=1282 题目大意: 求n的k次方的前三位和后三位数然后输出 后三位是用快速幂做的,我刚开始还是不会快速幂,后来慢慢理解了。 前三位求得比较厉害 我们可以吧n^k = a.bc * 10.0^m; k ...
分类:
其他好文 时间:
2016-05-31 20:28:05
阅读次数:
139
1027 - A Dangerous Maze PDF (English) Statistics ForumTime Limit: 2 second(s) Memory Limit: 32 MBYou are in a maze; seeing n doors in front of you in ...
分类:
其他好文 时间:
2016-05-31 06:20:13
阅读次数:
178
1021 - Painful Bases PDF (English) Statistics ForumTime Limit: 2 second(s) Memory Limit: 32 MBAs you know that sometimes base conversion is a painful ...
分类:
其他好文 时间:
2016-05-30 21:22:04
阅读次数:
229
题目链接:http://www.lightoj.com/volume_showproblem.php?problem=1064 题意:一次掷n个筛子,求点数之和大于m的概率。 思路:f[i][j]表示前i个筛子点数之和为j的概率,由此DP即可。不过这道题不用每次都乘以六分之一,因为n个筛子最后的分母 ...
1422 - Halloween Costumes PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB Gappu has a very busy weekend ahead of him. Becau ...
分类:
其他好文 时间:
2016-05-30 12:39:06
阅读次数:
318
1047 - Neighbor House PDF (English) Statistics ForumTime Limit: 0.5 second(s) Memory Limit: 32 MBThe people of Mohammadpur have decided to paint each ...
分类:
其他好文 时间:
2016-05-30 00:53:21
阅读次数:
161
1044 - Palindrome Partitioning PDF (English) Statistics ForumTime Limit: 1 second(s) Memory Limit: 32 MBA palindrome partition is the partitioning of ...
分类:
其他好文 时间:
2016-05-30 00:45:41
阅读次数:
172