2016年5月8日

摘要: #include<stdio.h> #include<string.h> int prime[40]={1,1,0,0,1,0,1,0,1,1,1,0,1,0,1,1,1,0,1,0,1,1,1,0,1,1,1,1,1,0,1,0,1,1,01,1,1,0,1,1}; int visit[21]; 阅读全文
posted @ 2016-05-08 17:50 寡言xy 阅读(127) 评论(0) 推荐(0) 编辑

2016年5月7日

摘要: #include<stdio.h> int a[10]; void backtrack(int n, int r, int k){ if(k >= r){ for(int i = 0; i < r; ++i){ printf("%d", a[i]); } printf("\n"); return;  阅读全文
posted @ 2016-05-07 20:28 寡言xy 阅读(93) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #define max(a,b) a>b?a:b int V,ans,n,w[21],sum[21]; void dfs(int i,int cnt) { if(i == 0) // { ans = max(ans,cnt); return ; } if(ans 阅读全文
posted @ 2016-05-07 20:09 寡言xy 阅读(197) 评论(0) 推荐(0) 编辑

2016年5月5日

摘要: #include <iostream> #include<algorithm>//sort函数的头文件 #include<functional>//greater/less的头文件 using namespace std; int main() { int a[10]={0}; int i; for 阅读全文
posted @ 2016-05-05 21:24 寡言xy 阅读(5013) 评论(0) 推荐(0) 编辑

2016年5月4日

摘要: #include <iostream> #include <cmath> using namespace std; double a[610]; int main() { int m; cin>>m; while(m--){ int n,i,j; cin>>n; for(i=0;i<n;i++){ 阅读全文
posted @ 2016-05-04 21:13 寡言xy 阅读(208) 评论(0) 推荐(0) 编辑

导航