IP Checking Time Limit: 2000MS Memory Limit: 32768KB 64bit IO Format: %lld & %llu Submit Status Description An IP address is a 32 bit address formatte ...
分类:
其他好文 时间:
2016-04-05 22:56:54
阅读次数:
218
题目链接:http://lightoj.com/volume_showproblem.php?problem=1197 给你a和b求a到b之间的素数个数。 先在小区间素数筛,大区间就用类似素数筛的想法,把a到b之间不是素数的标记出来。因为b-a最多1e5的大小,所以每组数据的时间复杂度最多就o(1e ...
分类:
其他好文 时间:
2016-04-01 21:49:30
阅读次数:
129
题意: 题意够坑的啊... 一个色子有n个面,第k次掷出一个加上这个k.求掷出所有面的期望值. 我一直以为值是色子面上的... 那么问题来了在色子面上怎么做...n还是1w级别... SOL: 对着理解错的题面想了半天还是没想出来比O(n^2)强的算法.. 这题跟上次lightoj那道丝帛题有点像, ...
分类:
其他好文 时间:
2016-04-01 01:04:21
阅读次数:
231
恢复内容开始 考了几个期望...一点都不会做...然后就补一补...还是找vjudge上的一些专题做...一些水题,放一起感觉好一点. Lightoj 1027 题意: n个门,每个门有一个权值并有两种选择走出去或者只是耗费时间,求期望走出去的时间. SOL: 第一题还是要打一下的... 很显然我们 ...
分类:
其他好文 时间:
2016-03-31 20:27:08
阅读次数:
179
Large Division Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %lld & %llu Submit Status Description Given two integers, a and b, you should ...
分类:
其他好文 时间:
2016-03-29 16:34:30
阅读次数:
146
Josephus Problem Time Limit: 2000MS Memory Limit: 32768KB 64bit IO Format: %lld & %llu Submit Status Description The historian Flavius Josephus relate ...
分类:
其他好文 时间:
2016-03-29 16:33:30
阅读次数:
184
Mad Counting Time Limit: 500MS Memory Limit: 32768KB 64bit IO Format: %lld & %llu Submit Status Description Mob was hijacked by the mayor of the Town ...
分类:
其他好文 时间:
2016-03-28 23:15:54
阅读次数:
209
A Childhood Game Time Limit: 500MS Memory Limit: 32768KB 64bit IO Format: %lld & %llu Submit Status Description Alice and Bob are playing a game with ...
分类:
其他好文 时间:
2016-03-28 21:28:44
阅读次数:
141
题目:http://lightoj.com/volume_showproblem.php?problem=1422 ...
分类:
其他好文 时间:
2016-03-28 01:51:33
阅读次数:
147
题目链接:http://lightoj.com/volume_showproblem.php?problem=1214 题意很好懂,同余定理的运用,要是A数被B数整除,那么A%B等于0。而A很大,那我就把A的每一位拆开,比如A是2341,那么2341=2000+300+40+1,然后你懂的... ...
分类:
其他好文 时间:
2016-03-27 21:23:12
阅读次数:
194