![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
并查集
大橘为重eleven
每天都因为自己太菜了而自闭
展开
-
家庭房产
7-1 家庭房产 (25 分)给定每个人的家庭成员和其自己名下的房产,请你统计出每个家庭的人口数、人均房产面积及房产套数。输入格式:输入第一行给出一个正整数N(≤1000),随后N行,每行按下列格式给出一个人的房产:编号 父 母 k 孩子1 … 孩子k 房产套数 总面积其中编号是每个人独有的一个4位数的编号;父和母分别是该编号对应的这个人的父母的编号(如果已经过世,则显示-1);k(0≤...原创 2019-04-21 14:16:12 · 393 阅读 · 0 评论 -
How Many Answers Are Wrong
题目链接题目描述:TT and FF are … friends. Uh… very very good friends -________-bFF is a bad boy, he is always wooing TT to play the following game with him. This is a very humdrum game. To begin with, TT s...原创 2019-08-13 20:07:54 · 111 阅读 · 0 评论 -
Building Block
题目描述:John are playing with blocks. There are N blocks (1 <= N <= 30000) numbered 1…N。Initially, there are N piles, and each pile contains one block. Then John do some operations P times (1 <...原创 2019-08-13 20:13:17 · 1417 阅读 · 0 评论 -
Zjnu Stadium
题目描述: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 people. The audience Seats made a...原创 2019-08-13 20:17:22 · 135 阅读 · 0 评论 -
Wireless Network
题目描述:An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computers, but an unexpected aftershock attacked, all computers in...原创 2019-08-13 20:45:00 · 315 阅读 · 0 评论 -
Find them, Catch them
题目描述: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 Dragon and Gang Snake. However, the police first needs to identify w...原创 2019-08-13 20:51:04 · 103 阅读 · 0 评论 -
食物链
题目描述:动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是哪一种。有人用两种说法对这N个动物所构成的食物链关系进行描述:第一种说法是"1 X Y",表示X和Y是同类。第二种说法是"2 X Y",表示X吃Y。此人对N个动物,用上述两种说法,一句接一句地说出K句...原创 2019-08-13 20:58:34 · 797 阅读 · 0 评论