摘要:你被要求设计一个计算器完成以下三项任务: 1、给定y,z,p,计算Y^Z Mod P 的值;(快速幂) 2、给定y,z,p,计算满足xy≡ Z ( mod P )的最小非负整数;(exgcd) 3、给定y,z,p,计算满足Y^x ≡ Z ( mod P)的最小非负整数。(BSGS) / Proble
阅读全文
摘要:http://codeforces.com/contest/710 A:水题 #include<bits/stdc++.h> #define fi first #define se second #define mp make_pair #define pb push_back #define pi
阅读全文