回溯法
Napoleon2004
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
UVA 524 Prime Ring Problem
#include<bits/stdc++.h> using namespace std; int t,n,a[100],zs[100]; void shai(int x){ zs[1]=1; zs[2]=0; for(int i=2;i<=x;i++) if(zs[i]==0) for(int j=2*i;j<=x;j+=i) zs[j]=1; } ...原创 2018-04-03 09:55:25 · 202 阅读 · 0 评论 -
UVA 129 Krypton Factor
#include<bits/stdc++.h> using namespace std; int sum,n,l; int dfs(int x,string s){ if(sum==n){ for(int i=0;i<s.size();i++){ printf("%c",s[i]); if(i%64==63)printf("\n"); else if(i%...原创 2018-04-03 09:56:32 · 127 阅读 · 0 评论 -
UVA 140 Bandwidth
#include<bits/stdc++.h> using namespace std; bool b[26],a[26][26]; int n,ans,s[26],c[26],anss[26]; void dfs(int x){ int i,j; if(x>n){ int m=0; for(i=1;i<n;i++) for(j=i+1;j<=n;j...原创 2018-04-03 09:57:51 · 142 阅读 · 0 评论
分享