摘要: problemsolutioncodes//模拟即可#include#includeusing namespace std;struct node{ int id, ch, score; bool operator x.score; if(... 阅读全文
posted @ 2018-06-05 21:27 gwj1139177410 阅读(98) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes#include#includeusing namespace std;const int maxn = 110;int a[maxn], b[maxn], c[maxn];bool cmp(int x, int y){ ... 阅读全文
posted @ 2018-06-05 21:21 gwj1139177410 阅读(89) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes//Meet in the Middle#include#include#includeusing namespace std;int n, mass, ans(666), f[233];mapma; //能称出的质量->需要的... 阅读全文
posted @ 2018-06-05 21:19 gwj1139177410 阅读(171) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes/*贪心1.找出不互质的数的集合,就是把互斥的数删去.2.那么当有两个互斥的数时,如果删掉前面(小)的,这个数后面的与它互斥的数也会入选,所以删掉后面的更优。3.因为每个数都是不同的。*/#include#include#inc... 阅读全文
posted @ 2018-06-05 21:18 gwj1139177410 阅读(196) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes//优先打价值最大的(如果能打的化)#include#includeusing namespace std;struct d{ int t, w; }a[110];bool cmp(d a, d b){ return a.w>=... 阅读全文
posted @ 2018-06-05 21:16 gwj1139177410 阅读(126) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes#includeusing namespace std;int n, ans = 0, t;void f(int a, char b, char c){ ans++; if(a == 1){ if(t)... 阅读全文
posted @ 2018-06-05 21:14 gwj1139177410 阅读(144) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes#includeusing namespace std;const int maxn = 110;int tree[maxn][2];void dfs1(int now){ cout>n; for(int i = 1... 阅读全文
posted @ 2018-06-05 21:13 gwj1139177410 阅读(123) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes#include#includeusing namespace std;const int maxn = 110;int tree[maxn][2], higt, weigt[maxn], ww;void dfs(int now... 阅读全文
posted @ 2018-06-05 21:12 gwj1139177410 阅读(110) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes/*作者:gwj1139177410题目:p2627 村村通*///Kruskal#include#include#includeusing namespace std;int n, a[110][110], fa[110], ... 阅读全文
posted @ 2018-06-05 21:11 gwj1139177410 阅读(162) 评论(0) 推荐(0) 编辑
选择