摘要: 畅通工程Time Limit: 4000/2000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 23558Accepted Submission(s): 12243 Problem Description某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路?Input测试输入包含若干测试用例。每个测试用例的第1 阅读全文
posted @ 2013-08-17 15:16 龚细军 阅读(333) 评论(0) 推荐(0)
摘要: 并查集(入门推荐) 阅读全文
posted @ 2013-08-17 14:52 龚细军 阅读(271) 评论(0) 推荐(0)
摘要: if(x!=Father(x))//这条代码-----其实我定义的是个数组,然而我却用错了括号【】我用了(),//D:\Microsoft Visual Studio\MyProjects\1\q.cpp(17) : error C2064: term does not evaluate to a function出现了这条信息..... 之后我将Father()-----》Father[]就好了!!,为防止以后再出现这样的错误,特将次单独笔记一下!!{Father[x]=findset(Father[x]);}return Father[x]; 阅读全文
posted @ 2013-08-17 14:47 龚细军 阅读(231) 评论(0) 推荐(0)
摘要: The SuspectsTime Limit: 1000MSMemory Limit: 20000KTotal Submissions: 18890Accepted: 9150DescriptionSevere acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to others, the best strategy is to se 阅读全文
posted @ 2013-08-17 14:16 龚细军 阅读(315) 评论(0) 推荐(0)
摘要: http://www.ahathinking.com/archives/10.html 阅读全文
posted @ 2013-08-17 12:14 龚细军 阅读(153) 评论(0) 推荐(0)