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 1155. Troubleduons

Looks easy, but I can't solve it, please give me a hint
Posted by Danica Porobic 17 Aug 2004 14:30
Re: Looks easy, but I can't solve it, please give me a hint
Posted by Gheorghe Stefan 18 Aug 2004 19:26
Here's my idea:
we eliminate all adjacent values on sides by minimum value. Finally there will be only values on the diagonals. We "grow" the common sides with the minimum from the two values and then cut the other two sides. After a few operations like this we have one vertex. If it's != 0 there is no solution.