2013年8月20日
摘要: 题目链接。AC代码如下:#include #include #include #include #include #include #include #include #include using namespace std;const int maxn = 10000;struct node { int x, s;};int end;bool vis[maxn], prime[maxn];int BFS(int s) { if(s == end) return 0; queue Q; memset(vis, 0, sizeof(vis)); vi... 阅读全文
posted @ 2013-08-20 21:10 Still_Raining 阅读(1008) 评论(0) 推荐(0) 编辑
摘要: 题目链接。#include #include #include #include #include #include #include using namespace std;const int maxn = 2000+10;int a[maxn], b[maxn];int main() { int T, n, m; scanf("%d", &T); while(T--) { priority_queue que; scanf("%d %d", &n, &m); for(int i=0; i que.top()... 阅读全文
posted @ 2013-08-20 10:36 Still_Raining 阅读(220) 评论(0) 推荐(0) 编辑