|
|
back to boardWA8 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 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 This test Helps on WA8 :) 6 2 1 1 2 2 2 4 4 0 4 2 5 3 Answer: 2 2 5 |
|
|