上一页 1 2 3 4 5 6 7 ··· 10 下一页
摘要: 大顶堆 小顶堆 阅读全文
posted @ 2017-04-09 16:44 爱记录一切美好的微笑 阅读(195) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include using namespace std; const int maxn=30; char maps[maxn][maxn]; int vis[maxn]; int n, k, ans, num; void dfs(int m) { if(num==k) { ans++; ... 阅读全文
posted @ 2017-04-05 16:33 爱记录一切美好的微笑 阅读(96) 评论(0) 推荐(0) 编辑
摘要: one. two. three. four. 阅读全文
posted @ 2017-04-05 16:32 爱记录一切美好的微笑 阅读(97) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include using namespace std; const int maxn=100007; int n, k, vis[maxn];; struct node { int x, step; }; int bfs() { queueQ; node p, q; ... 阅读全文
posted @ 2017-04-05 16:32 爱记录一切美好的微笑 阅读(102) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include #include using namespace std; const int maxn=1007; const int INF=0x3f3f3f3f; int maps[maxn][maxn], dist[maxn], vis[maxn]; int path[maxn], pathnu... 阅读全文
posted @ 2017-04-05 16:32 爱记录一切美好的微笑 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 给定两个整数集合,它们的相似度定义为:Nc/Nt*100%。其中Nc是两个集合都有的不相等整数的个数,Nt是两个集合一共有的不相等整数的个数。你的任务就是计算任意一对给定集合的相似度。 输入格式: 输入第一行给出一个正整数N(<=50),是集合的个数。随后N行,每行对应一个集合。每个集合首先给出一个 阅读全文
posted @ 2017-04-05 16:31 爱记录一切美好的微笑 阅读(298) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include #include #include using namespace std; const int maxn=1007; const int INF=0x3f3f3f3f; int main() { int n, num; sets; set::iterator ... 阅读全文
posted @ 2017-04-05 16:30 爱记录一切美好的微笑 阅读(93) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #define N 1000005 long long v[N], a[N], k; void Isprime() { int i, j; for(i=2; i<N; i++) { if(v[i]==0) { a[k++]... 阅读全文
posted @ 2017-04-05 16:30 爱记录一切美好的微笑 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://www.patest.cn/contests/gplt/L2-007 阅读全文
posted @ 2017-04-05 16:30 爱记录一切美好的微笑 阅读(100) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include using namespace std; int ans, num[5], vis[5]; void dfs(int x, int step) { if(step==4) { ans++; return; } for(in... 阅读全文
posted @ 2017-04-05 16:29 爱记录一切美好的微笑 阅读(127) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 10 下一页