摘要:
事先预警:由于我太蒻了,本做法只能在POJ、LOJ等小数据(N include include include include using namespace std; inline int read(){ char chr = getchar(); int f = 1,ans = 0; while 阅读全文
摘要:
主要是剪枝的问题,见代码,讲的很详细 include include include include using namespace std; inline int read(){ char chr = getchar(); int f = 1,ans = 0; while(!isdigit(chr 阅读全文
摘要:
【思路分析】 比较水的模拟题 具体见代码吧 cpp include include include using namespace std; inline int read(){ char chr = getchar(); int f = 1,ans = 0; while(!isdigit(chr) 阅读全文
摘要:
题目大意 求a^b %p 1≤a,b,p≤10^9 思路 时间O(10^9)一定会爆T,采用数学方法+位运算,得到O(log b)的快速幂算法 代码 c++ include include include include define ll long long using namespace std 阅读全文