1013 - Island Hopping

All about problems in Volume 10. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Post Reply
brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

1013 - Island Hopping

Post by brianfry713 » Thu Aug 28, 2014 12:35 am

There is a case in the judge's input where a number of inhabitants mi = 0, violating the problem statement. However the sum of the inhabitants will always be > 0.
Check input and AC output for thousands of problems on uDebug!

dibery
Learning poster
Posts: 76
Joined: Sat Feb 23, 2013 4:16 pm
Location: Taiwan, Taipei
Contact:

Re: 1013 - Island Hopping

Post by dibery » Tue Feb 24, 2015 10:15 am

Some points.

1. There may be more than 2 points on the same position.
2. All value fit in int.
3. Pay attention to capital letters in the output.
4. Print a blank line after EVERY case.
5. There may be multiple MSTs, but the average time will not differ.

Input:

Code: Select all

7
7 15 37
11 5 96
7 6 17
11 5 81
16 14 100
11 9 21
2 3 67
50
15 9 12
17 11 83
13 18 25
11 9 90
13 8 77
5 7 16
6 6 22
19 14 13
1 19 79
19 2 9
3 15 14
3 0 36
7 7 26
5 11 83
12 12 40
16 4 81
13 18 64
12 0 86
1 7 77
15 8 68
8 1 65
8 17 30
18 13 95
16 16 51
13 2 82
7 6 36
14 19 60
8 3 47
6 4 28
4 16 69
4 8 36
9 8 47
10 9 87
2 8 43
16 6 64
0 14 70
18 16 55
14 3 59
10 18 56
6 9 58
17 11 14
9 6 80
14 13 14
4 15 3
1 6 46
6 4 10
8 11 92
8 1 8
15 13 41
11 16 2
0
Output:

Code: Select all

Island Group: 1 Average 6.57

Island Group: 2 Average 2.67

Life shouldn't be null.

Post Reply

Return to “Volume 10 (1000-1099)”