上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 45 下一页
摘要: #include #include using namespace std; int n,SG,T; int getSG(int x,int y){ int num=0; while(1){ if(x&1 && y&1)return num; if(x&1)x++; else if(y&1)y++; else ... 阅读全文
posted @ 2017-10-07 20:34 wqtnb_tql_qwq_%%% 阅读(151) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; int n,a[30*2],sum,sum1,cnt=1; int main(){ scanf("%d",&n); for(int i=1;i<=n;i++){scanf("%d",&a[i]);} while(a[cnt]!=0){sum++; cnt++;} cnt=n; whi... 阅读全文
posted @ 2017-10-07 19:36 wqtnb_tql_qwq_%%% 阅读(124) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; int n,m[510][510],ans; int main(){ scanf("%d",&n); for(int i=1;i<n;i++) for(int j=i+1;j<=n;j++){ int x; sca... 阅读全文
posted @ 2017-10-07 19:17 wqtnb_tql_qwq_%%% 阅读(114) 评论(0) 推荐(0) 编辑
摘要: //欧拉函数: 欧拉函数是积性函数——若m,n互质 特殊性质:当n为奇数时, 若n为质数则 #include <cstdio> #include <iostream> using namespace std; const int N=40010; int n,p[N],nop[N],cnt,phi[ 阅读全文
posted @ 2017-10-07 17:51 wqtnb_tql_qwq_%%% 阅读(128) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; int n,k,a[10010],t[1000010],dp[10010],maxn,cnt; int main(){ scanf("%d",&n); for(int i=1;i<=n;i++){ int x; scanf("%d",&x); ... 阅读全文
posted @ 2017-10-07 17:16 wqtnb_tql_qwq_%%% 阅读(109) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; int n,k; int main(){ scanf("%d%d",&n,&k); printf("%d\n",n/k); return 0; } 阅读全文
posted @ 2017-10-07 16:37 wqtnb_tql_qwq_%%% 阅读(72) 评论(0) 推荐(0) 编辑
摘要: //构造杨辉三角形 //使用二项式定理求答案 阅读全文
posted @ 2017-10-07 16:31 wqtnb_tql_qwq_%%% 阅读(122) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; int n; long long ans=1; int main(){ scanf("%d",&n); for(register int i=1;i<=n;i++){ ans*=i; while(ans%10==0)ans/=10; ans%=100000000; ... 阅读全文
posted @ 2017-10-07 15:23 wqtnb_tql_qwq_%%% 阅读(114) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; const int N=510; const int INF=10 && x10 && y1<=m && h[x1][y1]<h[x][y]){ if(!vis[x1][y1])dfs(x1,y1); p[x][y].l=min(p[x][y].l,p[x1][y1]... 阅读全文
posted @ 2017-10-06 20:06 wqtnb_tql_qwq_%%% 阅读(130) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; const int N=70; int n,a[N],cnt,maxn,maxnn; bool cmp(int x,int y){return x>y;} bool use[N]; inline void dfs(int ans,int sum,int goal,int now){ i... 阅读全文
posted @ 2017-10-06 16:47 wqtnb_tql_qwq_%%% 阅读(104) 评论(0) 推荐(0) 编辑
上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 45 下一页