题意:给你一个n(0~1e6),前提是n不能被2和5整除,再给你一个10以内的数m,要求输出只由m组成的数(这个数能被n整除)的位数。 其实题目很简单,模拟一下我们用的笔算除法的过程就好了,只要保证数字不溢出就好,但菜鸡的我竟然没有第一时间想到。。。麻打麻打打内,哎~ ...
分类:
其他好文 时间:
2017-07-01 16:14:20
阅读次数:
180
1112 - Curious Robin Hood PDF (English) Statistics Forum Time Limit: 1 second(s) Memory Limit: 64 MB Robin Hood likes to loot rich people since he hel ...
分类:
编程语言 时间:
2017-06-27 15:07:01
阅读次数:
256
题目链接:http://www.lightoj.com/volume_showproblem.php?problem=1080 1080 - Binary Simulation PDF (English) Statistics Forum Time Limit: 2 second(s) Memory ...
分类:
其他好文 时间:
2017-06-26 19:02:02
阅读次数:
252
1427 - Substring Frequency (II) PDF (English) Statistics Forum Time Limit: 5 second(s) Memory Limit: 128 MB A string is a finite sequence of symbols t ...
分类:
其他好文 时间:
2017-06-22 10:04:21
阅读次数:
203
题目链接:http://www.lightoj.com/volume_showproblem.php?problem=1127 题意:有n个物体(n<30)和一个容量为W的容器。问将容器不装满的放置物品的方式有多少种。 思路 : 状态压缩+二分。将前n/2个物体看做一个总体,将剩下的看做一个总体。1 ...
分类:
其他好文 时间:
2017-06-12 18:50:16
阅读次数:
146
1138 - Trailing Zeroes (III) PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB You task is to find minimal natural number N, ...
分类:
其他好文 时间:
2017-06-08 19:40:48
阅读次数:
211
题目链接:LightOJ 1070 Algebraic Problem 题意:已知a+b和ab的值求a^n+b^n。结果模2^64。 思路: 1.找递推式 得到递推式之后就是矩阵高速幂了 注意:模2^64,定义成unsigned long long 类型,由于无符号类型超过最大范围的数与该数%最大范 ...
分类:
其他好文 时间:
2017-06-06 14:29:12
阅读次数:
228
Gappu has a very busy weekend ahead of him. Because, next weekend is Halloween, and he is planning to attend as many parties as he can. Since it's Hal ...
分类:
其他好文 时间:
2017-05-28 23:52:13
阅读次数:
345
#include<stdio.h> #include<string.h> #include<algorithm> #include<queue> #include<vector> #define MAX_N 300010 using namespace std; vector<pair<int,in ...
分类:
其他好文 时间:
2017-05-28 19:33:45
阅读次数:
215
题目链接:http://lightoj.com/volume_showproblem.php?problem=1018 题意分析:平面上有不超过N个点,如今能够随意方向划直线将它们划去,问:最少要划几次能够把全部的点划去? 解题思路:我们能够使用集合S表示:有哪些点还没有被划掉,然后转移 dp[s] ...
分类:
其他好文 时间:
2017-05-15 13:00:23
阅读次数:
188