10660 - Citizen attention offices

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

Moderator: Board moderators

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

Re: 10660 - Citizen attention offices

Post by brianfry713 »

Input:

Code: Select all

1
25
0 0 10000
0 1 10000
0 2 10000
0 3 10000
0 4 10000
1 0 10000
1 1 10000
1 2 10000
1 3 10000
1 4 10000
2 0 10000
2 1 10000
2 2 10000
2 3 10000
2 4 10000
3 0 10000
3 1 10000
3 2 10000
3 3 10000
3 4 10000
4 0 10000
4 1 10000
4 2 10000
4 3 10000
4 4 10000
AC output:

Code: Select all

0 7 14 16 23
Check input and AC output for thousands of problems on uDebug!

Lim.YuDe
New poster
Posts: 15
Joined: Sat Dec 13, 2014 1:32 pm

Re: 10660 - Citizen attention offices

Post by Lim.YuDe »

Got AC. Thank you so much Brianfry. I really need to learn to do better testing.

matheusdallrosa
New poster
Posts: 11
Joined: Fri Nov 08, 2013 11:04 pm

Re: 10660 - Citizen attention offices

Post by matheusdallrosa »

anybody could explain this cases?

4
1
2 2 1
4
0 0 1
4 4 1
0 4 1
4 0 1
5
0 0 1
1 1 1
2 2 1
3 3 1
4 4 1
7
4 2 2
3 3 1
2 4 3
2 1 1
1 3 4
1 2 2
1 0 1

Its the cases of the problem, i want to know where the five areas stay in every test so i can understand this, the problem statement is not so clear.

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

Re: 10660 - Citizen attention offices

Post by brianfry713 »

Look at the sample output.
Check input and AC output for thousands of problems on uDebug!

matheusdallrosa
New poster
Posts: 11
Joined: Fri Nov 08, 2013 11:04 pm

Re: 10660 - Citizen attention offices

Post by matheusdallrosa »

And we want to minimize the sum of the minimum distances from all the areas, but having into account the quantity of people living in each area.

Because of this part of the statement i think that the sample output is the sum of the distances between an office to all the areas, but i can't find where the offices stayed.

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

Re: 10660 - Citizen attention offices

Post by brianfry713 »

The first square in the problem statement assigns numbers to each of the 25 areas.
The output is 5 of those numbers.
Check input and AC output for thousands of problems on uDebug!

Post Reply

Return to “Volume 106 (10600-10699)”