随笔分类 -  数论

1
中国剩余定理 (POJ 1006)
摘要:http://poj.org/problem?id=1006 Description Input Output Sample Input Sample Output 阅读全文
posted @ 2016-03-22 16:26 栀蓝 阅读(323) 评论(0) 推荐(0)
(打表+优化)简单的求和 -- zzuli -- 1783
摘要:http://acm.zzuli.edu.cn/problem.php?id=17831783: 简单的求和Time Limit:1 SecMemory Limit:128 MBSubmit:170Solved:31SubmitStatusWeb BoardDescription定义f(i)代表i的... 阅读全文
posted @ 2015-11-23 16:34 栀蓝 阅读(250) 评论(0) 推荐(0)
A Magic Lamp -- hdu -- 3183
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=3183A Magic LampTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submiss... 阅读全文
posted @ 2015-11-14 20:37 栀蓝 阅读(337) 评论(0) 推荐(0)
Reorder the Books -- hdu -- 5500
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=5500Reorder the BooksTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 131072/131072 K (Java/Others)Total ... 阅读全文
posted @ 2015-11-14 20:31 栀蓝 阅读(178) 评论(0) 推荐(0)
(数学)Knight's Trip -- hdu -- 3766
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=3766Knight's TripTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submis... 阅读全文
posted @ 2015-11-10 20:10 栀蓝 阅读(862) 评论(0) 推荐(0)
(数论)LightOJ -- 1245
摘要:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=98634#problem/B(acm14)DescriptionI was trying to solve problem'1234 - Harmonic Number', I wrote ... 阅读全文
posted @ 2015-11-08 15:58 栀蓝 阅读(167) 评论(0) 推荐(0)
(树状数组+离散化)lines--hdu --5124
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=5124linesTime Limit: 5000/2500 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s):... 阅读全文
posted @ 2015-11-08 15:32 栀蓝 阅读(175) 评论(0) 推荐(0)
(矩阵快速幂) Fibonacci -- poj -- 3070
摘要:链接:http://poj.org/problem?id=3070FibonacciTime Limit:1000MSMemory Limit:65536KTotal Submissions:11236Accepted:7991DescriptionIn the Fibonacci integer ... 阅读全文
posted @ 2015-09-22 19:47 栀蓝 阅读(188) 评论(0) 推荐(0)
(欧拉公式 很水) Coprimes -- sgu -- 1002
摘要:链接:http://vj.acmclub.cn/contest/view.action?cid=168#problem/BCoprimes时限:250MS内存:4096KB64位IO格式:%I64d & %I64u状态练习SGU 102问题描述For given integer N (1#inclu... 阅读全文
posted @ 2015-09-12 15:35 栀蓝 阅读(236) 评论(0) 推荐(0)
(简单的物理题)Bungee Jumping
摘要:链接:http://acm.hdu.edu.cn/showproblem.php?pid=1155Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7... 阅读全文
posted @ 2015-09-05 11:55 栀蓝 阅读(261) 评论(0) 推荐(0)
Max Sum -- hdu -- 1003
摘要:链接:http://acm.hdu.edu.cn/showproblem.php?pid=1003Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1... 阅读全文
posted @ 2015-09-03 09:16 栀蓝 阅读(160) 评论(0) 推荐(0)
(二分搜索 数论)(求阶乘里零个数对应的阶乘)light oj -- 1138
摘要:链接DescriptionYou task is to find minimal natural numberN, so thatN!contains exactlyQzeroes on the trail in decimal notation. As you knowN! = 1*2*...*N... 阅读全文
posted @ 2015-08-21 13:05 栀蓝 阅读(220) 评论(0) 推荐(0)
(DP)To The Max --HDU -- 1081
摘要:链接: http://acm.hdu.edu.cn/showproblem.php?pid=1081 这道题使用到的算法是:预处理+最大连续子串和 如果会做最大连续子串和,那么理解这题就相对简单一些,若不知道最大连续子串和,建议先看一下这两题: http://acm.hdu.edu.cn/showp 阅读全文
posted @ 2015-08-21 12:45 栀蓝 阅读(250) 评论(0) 推荐(0)
(二进制 异或)Team Formation --ZOJ --3870
摘要:链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3870http://acm.hust.edu.cn/vjudge/contest/view.action?cid=88230#problem/I (密码:0817)题目... 阅读全文
posted @ 2015-08-17 21:17 栀蓝 阅读(242) 评论(0) 推荐(0)
(小数化分数)小数化分数2 -- HDU --1717
摘要:链接:http://acm.hdu.edu.cn/showproblem.php?pid=1717举例:0.24333333…………=(243-24)/900=73/3000.9545454…………=(954-9)/990=945/990=21/22代码:#include#include#defin... 阅读全文
posted @ 2015-08-13 08:34 栀蓝 阅读(164) 评论(0) 推荐(0)
(小数化分数)小数化分数2 --HDU --1717
摘要:链接:http://acm.hdu.edu.cn/showproblem.php?pid=1717举例:0.24333333…………=(243-24)/900=73/3000.9545454…………=(954-9)/990=945/990=21/22代码:#include#include#defin... 阅读全文
posted @ 2015-08-13 08:21 栀蓝 阅读(329) 评论(0) 推荐(0)
(能被11整除的数的特征)The shortest problem --hdu
摘要:链接:http://acm.hdu.edu.cn/contests/contest_showproblem.php?pid=1005&cid=595若一个整数的个位数字截去,再从余下的数中,减去个位数的2倍,如果差是7的倍数,则原数能被7整除。如果一次不容易看出,就需要继续上述过程。如6139,过程... 阅读全文
posted @ 2015-08-11 14:49 栀蓝 阅读(786) 评论(0) 推荐(0)
(快速幂)Key Set--hdu--5363
摘要:链接:http://acm.hdu.edu.cn/showproblem.php?pid=5363http://acm.hust.edu.cn/vjudge/contest/view.action?cid=86698#problem/C代码:#include#include#include#incl... 阅读全文
posted @ 2015-08-08 09:16 栀蓝 阅读(211) 评论(0) 推荐(0)
(有点递归的感觉)RGCDQ--hdu--5317
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5317感觉好神奇呀,一堆数在一起可以找到规律,学长讲完后,觉得自己是如此的so youngf[x]不超过7的代码: 1 #include 2 #include 3 #include 4 #include ... 阅读全文
posted @ 2015-07-28 20:44 栀蓝 阅读(141) 评论(0) 推荐(0)
(不用循环也可以记录数组里的数)Color the ball --hdu--1556
摘要:题目:N个气球排成一排,从左到右依次编号为1,2,3....N.每次给定2个整数a b(a 2 #include 3 #define maxn 110000 4 5 int aa[maxn]; 6 7 int main() 8 { 9 int t;10 11 while(sca... 阅读全文
posted @ 2015-07-19 16:45 栀蓝 阅读(176) 评论(0) 推荐(0)

1

levels of contents