摘要: 1467: Pku3243 clever Y Description 小Y发现,数学中有一个很有趣的式子: X^Y mod Z = K 给出X、Y、Z,我们都知道如何很快的计算K。但是如果给出X、Z、K,你是否知道如何快速的计算Y呢? Input 本题由多组数据(不超过20组),每组测试数据包含一行 阅读全文
posted @ 2016-11-01 18:24 jhz033 阅读(207) 评论(0) 推荐(0) 编辑
摘要: kuangbin的BSGS: c为素数; 扩展BSGS: 阅读全文
posted @ 2016-11-01 17:18 jhz033 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 2242: [SDOI2011]计算器 Description 你被要求设计一个计算器完成以下三项任务: 1、给定y,z,p,计算Y^Z Mod P 的值; 2、给定y,z,p,计算满足xy≡ Z ( mod P )的最小非负整数; 3、给定y,z,p,计算满足Y^x ≡ Z ( mod P)的最小 阅读全文
posted @ 2016-11-01 16:08 jhz033 阅读(153) 评论(0) 推荐(0) 编辑
摘要: C. Guess Your Way Out! time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Amr bought a new v 阅读全文
posted @ 2016-11-01 14:28 jhz033 阅读(225) 评论(0) 推荐(0) 编辑
摘要: D. Kostya the Sculptor time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Kostya is a genia 阅读全文
posted @ 2016-11-01 14:17 jhz033 阅读(226) 评论(0) 推荐(0) 编辑
摘要: C. Epidemic in Monstropolis time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output There was an 阅读全文
posted @ 2016-11-01 14:14 jhz033 阅读(275) 评论(0) 推荐(0) 编辑