08 2019 档案

摘要:例如 90=2*3^2*5; N=p1^r1*p2^r2*p3^r3.........pn^rn(pi是质数且p1<p2<p3<.....<pn). 代码实现 #include<cstdio> #include<iostream> #include<algorithm> #include<map> 阅读全文
posted @ 2019-08-12 20:51 zw100 阅读(365) 评论(0) 推荐(0) 编辑
摘要:代码如下; #include<iostream>#include<vector>#include<queue>#include<cstring>using namespace std;const int maxn = 1000;int in[maxn];vector<int>V[maxn]; int 阅读全文
posted @ 2019-08-09 19:29 zw100 阅读(89) 评论(0) 推荐(0) 编辑
摘要:int pow(int a,int b,int c)//a为底数,b为指数,c模数。 { int ans=1; a=a%c; while(b>0) { if(b&1) { ans=(ans*a)%c; } a=(a*a)%c; b=b/2; } return ans; } 阅读全文
posted @ 2019-08-01 11:00 zw100 阅读(69) 评论(0) 推荐(0) 编辑
摘要:代码 ; int pow(int a,int b)//b为幂。 { int ans=1; while(b>0) { if(b%2!=0){ans*=a} a=a*a; b=b/2; } } 阅读全文
posted @ 2019-08-01 10:40 zw100 阅读(62) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>#include<cstdio>#include<algorithm> using namespace std;const int maxn = 1e4+100;int dp[maxn];int p[maxn],n,m; int main(){ while(cin 阅读全文
posted @ 2019-08-01 09:46 zw100 阅读(117) 评论(0) 推荐(0) 编辑