一、题目DescriptionThere is a town with N citizens. It is known that some pairs of people are friends. According to the famous saying that ?The friends of...
分类:
其他好文 时间:
2014-07-27 22:32:29
阅读次数:
278
Problem IFRIENDSThere is a town with N citizens. It is known that some pairs of people are friends. According to the famous saying that ?The friends o...
分类:
其他好文 时间:
2014-07-27 22:31:29
阅读次数:
255
DescriptionBeing a programmer, you like arrays a lot. For your birthday, your friends have given you an arrayaconsisting ofndistinctintegers.Unfortuna...
分类:
其他好文 时间:
2014-07-27 22:27:19
阅读次数:
219
Problem DescriptionThere is a town with N citizens. It is known that some pairs of people are friends. According to the famous saying that “The friend...
分类:
其他好文 时间:
2014-07-27 22:26:19
阅读次数:
199
一、原题DescriptionBeing a programmer, you like arrays a lot. For your birthday, your friends have given you an arrayaconsisting ofndistinctintegers.Unfor...
分类:
其他好文 时间:
2014-07-27 22:22:59
阅读次数:
317
题目来源:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1549 并查集,求出每个friends集合,然后再计算每个集合friends个数,求出最...
分类:
其他好文 时间:
2014-07-27 22:01:29
阅读次数:
234
ll T;
while(~scanf("%d",&T)){
while(T--) {
= = ...
思路:
用秩合并,看了题解才发现 if(fx == fy)要输出当前集合的秩而不是0。。。
#include
#include
#include
#include
#include
#include
#include
#include
#include
#inc...
分类:
其他好文 时间:
2014-07-26 02:14:47
阅读次数:
222
索引的原文档(Document)。为了方便说明索引创建过程,这里特意用两个文件为例:文件一:Students should be allowed to go out with their friends, but not allowed to drink beer.文件二:My friend Jer...
分类:
其他好文 时间:
2014-07-25 03:19:37
阅读次数:
201
Problem Description
Angel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M
Angel's friends want to save Angel. Their task is: approach Angel. W...
分类:
其他好文 时间:
2014-07-23 16:40:42
阅读次数:
233
Rescue
Time Limit: 2 Seconds Memory Limit: 65536 KB
Angel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M
Angel's friends want to sa...
分类:
其他好文 时间:
2014-07-22 14:28:26
阅读次数:
200