摘要:
Discrete Logging POJ - 2417 题意:给P,B,N,求最小的L使得 BL≡N (mod P),其中P是素数。 Baby Step Giant Step 1 #include <cstdio> 2 #include <cstring> 3 #include <iostream> 阅读全文
摘要:
Biorhythms POJ - 1006 题意: 求解一元线性同余方程组。 1 #include <cstdio> 2 #include <cstring> 3 using namespace std; 4 const int maxn=1010; 5 int b[maxn],m[maxn]; 6 阅读全文
摘要:
The Luckiest number POJ - 3696 题意:给一个数L,问至少几个8(如88,8888,88888)可以整数L。若不能,就输出-1. 参考的两位dalao的 http://blog.csdn.net/Danliwoo/article/details/48865127 http 阅读全文
摘要:
Area of Mushroom HDU - 4946 题意: 1 #include <cstdio> 2 #include <cstring> 3 #include <iostream> 4 #include <algorithm> 5 #include <cmath> 6 using names 阅读全文