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 1774. Barber of the Army of Mages

WA 39
Posted by Steven 5 Apr 2011 15:49
Can somebody give me anti-greedy tests so that a greedy solution will not give correct answer? A test like #39? I'm sure that greedy is the right solution, i cannot find counter-test for my solution.
Re: WA 39
Posted by Milanka Halilovich 8 Apr 2011 15:50
I have same problem... Try:
3 1
1 6
3 2
2 4
Re: WA 39
Posted by Milanka Halilovich 8 Apr 2011 17:17
..or..
3 1
2 4
3 2
0 4

Edited by author 08.04.2011 17:18
Re: WA 39
Posted by Filip Zivkovic 24 Apr 2011 02:31
I have same problem and my program works for this input (both R possible, correct me if I'm wrong) and I would appreciate if someone would suggest why program is not working and/or give me more tests like #39.

Edited by author 24.04.2011 02:46
Re: WA 39
Posted by Marko 28 Apr 2011 18:14
Same problem... Can somebody give us some tests?
Re: WA 39
Posted by BSoD 26 Jul 2011 17:00
Try this:
5 2
0 3
3 2
3 2
0 2
0 5
Re: WA 39
Posted by BSoD 26 Jul 2011 20:27
This one is also nice:
4 2
0 3
1 2
2 2
1 4
Re: WA 39
Posted by Ade 1 Feb 2023 19:37
Great thanks to @BSoD

Edited by author 01.02.2023 19:37

Edited by author 01.02.2023 19:37