上一页 1 2 3 4 5 6 ··· 9 下一页
摘要: 1 /* 2 LightOJ1245 Harmonic Number (II) 3 http://lightoj.com/login_main.php?url=volume_showproblem.php?problem=1245 4 数论 求和 5 */ 6 #include 7 #include 8 #include 9 #include 10 #inclu... 阅读全文
posted @ 2017-04-14 14:26 BBBob 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 LightOJ1234 Harmonic Number 3 http://lightoj.com/login_main.php?url=volume_showproblem.php?problem=1234 4 打表 分块 5 由于只有加法运算,1e8时间是可以承受的。 6 然而空间无法承受,于是以50个单位为一块进行分块。 7 */ 8 #inclu... 阅读全文
posted @ 2017-04-13 19:31 BBBob 阅读(288) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 POJ2115 C Looooops 3 http://poj.org/problem?id=2115 4 扩展欧几里得 5 题意:求x, s.t. (a+c*x)=b (mod 1 c*x=b-a (mod 1 9 #include 10 #include 11 #include 12 #include 13 #include 14 #include... 阅读全文
posted @ 2017-04-13 08:37 BBBob 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 POJ2116 Death to Binary? 3 http://poj.org/problem?id=2116 4 齐肯多夫定理 5 6 */ 7 #include 8 #include 9 #include 10 #include 11 #include 12 #include 13 #include 14... 阅读全文
posted @ 2017-04-12 11:14 BBBob 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 POJ3318 Matrix Multiplication 3 http://poj.org/problem?id=3318 4 随机化算法 矩阵 5 随机一个1×n的矩阵h 6 在ab=c左右两边左乘h 7 验证是否相等 8 然而不知道为什么g++交就会RE, 9 c++交AC 10 * 11 */ 12 #inclu... 阅读全文
posted @ 2017-04-06 13:49 BBBob 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 今天是璐璐的生日啦!有我的第一个生日哦~ 以后璐璐的每一个生日,都会有我陪伴🙂 最后,爱生活,爱璐璐! 阅读全文
posted @ 2017-04-05 00:00 BBBob 阅读(356) 评论(1) 推荐(0) 编辑
摘要: 1 /* 2 HDU4569 Special equations 3 http://acm.hdu.edu.cn/showproblem.php?pid=4569 4 数论 5 题意:f(x)为一n次方程求是否存在x, s.t. f(x)=0 (mod p^2) 6 其中p为质数 7 首先,我们只需考虑0-p中的x即可,因为其他的x总可以先取模 8 到这个区间,因... 阅读全文
posted @ 2017-04-02 00:22 BBBob 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 HDU4572 Bottles Arrangement 3 http://acm.hdu.edu.cn/showproblem.php?pid=4572 4 数论 找规律 5 题意:有m行n列和1-n的数各n个,将其填在m×n的格子里 6 要求同一列中的数各不相同,同一行中相邻两数的差的绝对值不超过1。 7 求每一行中值的和的最小值。 8 9 这道... 阅读全文
posted @ 2017-04-02 00:11 BBBob 阅读(273) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 HDU4565 So Easy! 3 http://acm.hdu.edu.cn/showproblem.php?pid=4565 4 数论 快速幂 矩阵快速幂 5 题意:求[(a+sqrt(b))^n ]%m [ ]代表向上取证 6 联想到斐波那契数列,所以第一感觉是矩阵快速幂 7 后来发现根本不用这么麻烦,我们认为a+b*sqrt(c)中... 阅读全文
posted @ 2017-04-01 23:59 BBBob 阅读(230) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 CF789B. Masha and geometric depression 3 http://codeforces.com/contest/789/problem/B 4 水题 5 各种特判,贼烦 6 */ 7 #include 8 #include 9 #include 10 #include 11 #include ... 阅读全文
posted @ 2017-03-30 12:02 BBBob 阅读(1488) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 9 下一页