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 1152. False Mirrors

Is there any trick?
Posted by Junjie Liang 22 Jan 2002 18:23
I'm using brute search with pruning, and all the cases which I tested
seems alright, but I still get WA. Is there any trick?

My code:

[code deleted]


Edited by moderator 28.07.2006 10:35
Brute force seems to be incorrect (+)
Posted by shitty.Mishka 23 Jan 2002 03:38
Try this test:
8
4 5 6 5 4 5 6 5

The answer of your program is 34, while the correct answer is 33:
4 5 6 5 4 5 6 5
4 * * * 4 5 6 5   - 24
4 * * * * * * 5   - 9
* * * * * * * *

My program uses BFS.

Hope this will help.

Good luck!
Now it's AC
Posted by Junjie Liang 23 Jan 2002 19:05
Thanks for your test. I found my mistake, but it was very inefficient
(4.11second). Do you know how some people solved it in less than 1
second?
Re: Brute force seems to be incorrect (+)
Posted by [AESC USU] MajorM 26 Jul 2006 22:13
Are you sure that correct answer is 33?
My program give answer 32
4 5 6 5 4 5 6 5
4 * * * 4 5 6 5 - 24
4 * * * 4 * * * - 8
* * * * * * * *

But I have WA3 (. May be I don't understand this problem
Re: Brute force seems to be incorrect (+)
Posted by Samsonov Alex [USU] 26 Jul 2006 23:08
Your last step is incorrect. The balconies don't became circular after the shots. The distance between two final balconies is 4 in both directions, so the can't be destroyed by one shot.
Re: Brute force seems to be incorrect (+)
Posted by ANZhigMAI 12 Dec 2010 06:10
4 5 6 5 4 5 6 5
4 * * * 4 5 6 5 - 24
4 * * * 4 * * * - 8
* * * * * * * *
not like this?