题目链接:http://lightoj.com/volume_showproblem.php?problem=1383 题意:在平面图中,有一条河,用直线y=k表示,河上面(y>k)的都是敌方区域,y<k的都是水,现在有s个狙击手在水中不知道他们的位置;有n个敌军的士兵,已知他们的坐标; 狙击手有一 ...
分类:
其他好文 时间:
2016-09-21 20:06:49
阅读次数:
154
题目大意:求n^k的前三位数 和 后三位数。 题目思路:后三位数直接用快速幂取模就行了,前三位则有些小技巧: 对任意正数都有n=10^T(T可为小数),设T=x+y,则n=10^(x+y)=10^x*10^y,其中10^x为10的整倍数(x为整数确定数位长度),所以主要求出10^y的值。 T=log ...
分类:
其他好文 时间:
2016-09-21 20:05:34
阅读次数:
198
fuck!!!!!该死的题,说好的一大串,生怕按题中代码执行会超时,md,居然就是按题中的代码来,就改一丁点就行了!!!!!!!fuck,坑啊!!!!!!!!! Hex-a-bonacci PDF (English) Statistics Forum Time Limit: 0.5 second(s ...
分类:
其他好文 时间:
2016-09-17 12:08:45
阅读次数:
200
题目链接:http://www.lightoj.com/volume_showproblem.php?problem=1100 给你n个数,数的范围是1~1000,给你q个询问,每个询问问你l到r之间数的最小差是多少。 要是l到r的数字个数大于1000,必定会有两个数字重复,所以此时最小差就为0。要 ...
分类:
其他好文 时间:
2016-09-16 15:35:07
阅读次数:
141
题目链接:http://www.lightoj.com/volume_showproblem.php?problem=1025 题目大意:一串字符, 通过删除其中一些字符, 能够使这串字符变成回文串。 现在给你一串字符,问能够得到多少种不同的回文串; 注意:字符串"abba", 可以得到9串回文串, ...
分类:
其他好文 时间:
2016-09-15 19:18:13
阅读次数:
216
题目链接:http://www.lightoj.com/volume_showproblem.php?problem=1019 题目大意:Tanvir想从节点1的位置走到节点n的位置, 输出最短距离, 如果不存在输出"Impossible". 解题思路:dijkstra模版题 代码如下: ...
分类:
其他好文 时间:
2016-09-15 19:13:12
阅读次数:
143
1、LightOJ 1245 Harmonic Number (II) 数学题 2、总结:看了题解,很严谨,但又确实恶心的题 题意:求n/1+n/2+....+n/n,n<=2^31。 #include<iostream> #include<cstring> #include<cmath> #inc ...
分类:
其他好文 时间:
2016-09-14 01:44:14
阅读次数:
187
1、LightOJ 1370 Bi-shoe and Phi-shoe 欧拉函数 2、总结: #include<iostream> #include<cstring> #include<cmath> #include<queue> #include<algorithm> #include<cstdi ...
分类:
其他好文 时间:
2016-09-14 01:39:35
阅读次数:
153
问圆和多边形相交,什么时候比例可以是一个定值。 二分加模板,可就是过不了。。。伤心。。。帖一发新模板,意思都一样,真是纠结了。 http://tokers.cn/2015/10/08/lightoj1358-fukushima-nuclear-blast%e4%ba%8c%e5%88%86%e5%9 ...
分类:
其他好文 时间:
2016-09-13 13:09:48
阅读次数:
188
1188 - Fast Queries PDF (English) Statistics Forum Time Limit: 3 second(s) Memory Limit: 64 MB Given an array of N integers indexed from 1 to N, and q ...
分类:
其他好文 时间:
2016-09-05 19:10:42
阅读次数:
184