#include<iostream> #include<cstring> #include<cstdio> using namespace std; +; int p[N]; int w[N]; int find(int x) { if(p[x]==x) return x; int root=find(p[x]); w[x]+=w[p[x]]; p[x]=root; return p[x]; } int n,m; int main() { while(~scanf(&q…
Zjnu Stadium 题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=3047 Problem Description In 12th Zhejiang College Students Games 2007, there was a new stadium built in Zhejiang Normal University. It was a modern stadium which could hold thousands of peop…
传送门 Find them, Catch them Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 42463 Accepted: 13065 Description The police office in Tadu City decides to say ends to the chaos, as launch actions to root up the TWO gangs in the city, Gang D…
True Liars Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 2713 Accepted: 868 Description After having drifted about in a small boat for a couple of days, Akira Crusoe Maeda was finally cast ashore on a foggy island. Though he was exha…
Navigation Nightmare Time Limit: 2000MS Memory Limit: 30000K Total Submissions: 5939 Accepted: 2102 Case Time Limit: 1000MS Description Farmer John's pastoral neighborhood has N farms (2 <= N <= 40,000), usually numbered/labeled 1..N. A series o…