ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1824. Ifrit Bomber

WA8
Posted by MOPDOBOPOT (USU) 25 Mar 2011 19:53
I count the neighboring cities, which will destroy the explosion in the ith city. After that, output the citys which have not yet destroyed and with the largest number of neighbors (which fall under the explosion) until I have destroyed everything.
Simple BF but WA8 :(
Can anyone help me?
Maybe i forgot about any special case?

Edited by author 25.03.2011 19:56
Re: WA8
In the 8th test it is optimal to bomb city which is already destroyed. During the contest I kept getting WA because of that...
Re: WA8
Posted by MOPDOBOPOT (USU) 27 Mar 2011 22:18
Thank you!
Now I count the number of alive near-citys on each step for each city hasn't been bombing.
And gets WA13 :)
Re: WA8
Posted by Dawid Drozd 24 May 2011 13:09
This test Helps on WA8 :)
6 2
1 1
2 2
2 4
4 0
4 2
5 3

Answer:

2
2 5