摘要: http://poj.org/problem?id=2421 There are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can 阅读全文
posted @ 2018-10-05 16:30 丧心病狂工科女 阅读(134) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=1287 You are assigned to design network connections between certain points in a wide area. You are given a set of points in 阅读全文
posted @ 2018-10-05 14:23 丧心病狂工科女 阅读(172) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; const int maxn = 5e5 + 10; int h[maxn], v[maxn], nx[maxn], in[maxn]; int n, m, sz; void add(int a, int b) { v[sz] = b; nx[sz] = h[a]; h[a] = sz; in[b] ++; s... 阅读全文
posted @ 2018-10-05 11:06 丧心病狂工科女 阅读(113) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=1251 The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads 阅读全文
posted @ 2018-10-05 10:40 丧心病狂工科女 阅读(128) 评论(0) 推荐(0) 编辑