上一页 1 ··· 45 46 47 48 49 50 51 52 53 ··· 55 下一页
摘要: C. Bear and Colors time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Bear Limak has n colo 阅读全文
posted @ 2016-05-09 15:49 jhz033 阅读(237) 评论(0) 推荐(0) 编辑
摘要: Yada Number Time Limit : 2000 MS Memory Limit : 65536 KB Yada Number Yada Number Problem Description: Every positive integer can be expressed by multi 阅读全文
posted @ 2016-05-09 15:33 jhz033 阅读(333) 评论(0) 推荐(0) 编辑
摘要: 题目1 : 数论六·模线性方程组 题目1 : 数论六·模线性方程组 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 小Ho:今天我听到一个挺有意思的故事! 小Hi:什么故事啊? 小Ho:说秦末,刘邦的将军韩信带领1500名士兵经历了一场战斗,战死四百余人。韩信为了清点人 阅读全文
posted @ 2016-05-08 23:47 jhz033 阅读(176) 评论(0) 推荐(0) 编辑
摘要: GCD Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description The greatest common divisor GCD(a,b) of two p 阅读全文
posted @ 2016-05-07 20:45 jhz033 阅读(187) 评论(0) 推荐(0) 编辑
摘要: Longge's problem Description Longge is good at mathematics and he likes to think about hard mathematical problems which will be solved by some gracefu 阅读全文
posted @ 2016-05-07 19:42 jhz033 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 判断一个素数是否为素数: 1:2-n-1。。。for暴力判断; 2:sqrt(n) 判断; 3:一个我也不知道为什么的代码,总之蛮快的 4:判断一个大素数的米勒拉宾素数测试 复杂度:O(k*log(n))k是测试的次数 素数打表: 1 埃拉特斯特尼筛法复杂度O(n loglog(n)); 2 欧拉筛 阅读全文
posted @ 2016-05-07 11:21 jhz033 阅读(289) 评论(0) 推荐(0) 编辑
摘要: 首先需要知道两个定理: 1: 费马小定理: 假如p是素数,且gcd(a,p)=1,那么 a(p-1)≡1(mod p)。 2:二次探测定理:如果p是素数,x是小于p的正整数,且,那么要么x=1,要么x=p-1。 证明:这是显然的,因为相当于p能整除,也即p能整除(x+1)(x-1)。 由于p是素数, 阅读全文
posted @ 2016-05-07 10:47 jhz033 阅读(526) 评论(0) 推荐(0) 编辑
摘要: Calculation 2 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description Given a positive integer N, your ta 阅读全文
posted @ 2016-05-06 22:19 jhz033 阅读(188) 评论(0) 推荐(0) 编辑
摘要: D2. Magic Powder - 2 time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output D2. Magic Powder - 2 阅读全文
posted @ 2016-05-06 13:58 jhz033 阅读(165) 评论(0) 推荐(0) 编辑
摘要: C. Cinema time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output C. Cinema time limit per test 阅读全文
posted @ 2016-05-06 13:54 jhz033 阅读(122) 评论(0) 推荐(0) 编辑
上一页 1 ··· 45 46 47 48 49 50 51 52 53 ··· 55 下一页