Problem Description The so-called best problem solver can easily solve this problem, with his/her childhood sweetheart. It is known that y=(5+2√6)^(1+2^x).For a given integer x (0≤x<2^32) and a given prime number M (M≤46337) , print [y]%M . ([y] mean…
Best Solver The so-called best problem solver can easily solve this problem, with his/her childhood sweetheart. It is known that y=(5+26–√)1+2xy=(5+26)1+2x. For a given integer x (0≤x<232)x (0≤x<232) and a given prime number M (M≤46337)M (M≤46337),…
Best Solver Time Limit: 1500/1000 MS (Java/Others) Memory Limit: 65535/102400 K (Java/Others)Total Submission(s): 1115 Accepted Submission(s): 645 Problem Description The so-called best problem solver can easily solve this problem, with his/her…
没有意识到循环节最大是M^2,用域Z_M下二阶可逆矩阵群的最大循环节(M^2-1)*(M^2-M)来做,考虑大数乘法,矩阵乘法,做到吐血.将代码贴在下方留作纪念. #include<bits/stdc++.h> using namespace std; #define rep(i,a,b) for(int i=a;i<=b;++i) #define ms(arr,a) memset(arr,a,sizeof arr) long long P; long long M; long long…
Problem Description As is known to all, Sempr(Liangjing Wang) had solved more than 1400 problems on POJ, but nobody know the days and nights he had spent on solving problems. Xiangsanzi(Chen Zhou) was a perfect problem solver too. Now this is a story…