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 1006. Square Frames

I got AC but my program won't work for certain tests!
Posted by Daniel Mahu 11 Jul 2004 19:06
I searched squares starting from each corner. This got me AC.
Here is a test for which my program fails:

5
1 1 4
1 1 2
1 4 2
4 1 2
4 4 2

You will notice that if you try to reconstruct the squares
starting from the corner images (the way my implementation
does), you will find the small squares of width 2 but not
the larger one (whose corners have been completely hidden).
However, the edges of the larger square will have remained
uncovered by that solution.

You might want to consider adding a similar test
to the test data.
Re: I got AC but my program won't work for certain tests!
Posted by yzthz 17 Mar 2009 19:09
In fact, there are some uncertainties if squares are overlapping too much.
The problem does not require us to find the smallest number of frames, hence it is ok in this case if our solutions produce 2 small squares instead of 1 big square.
Re: I got AC but my program won't work for certain tests!
Posted by Daniel Mahu 4 Apr 2009 22:33
My first message was actually right, but it no longer applies - they rejudged the problem apparently, and my program that initially got AC now fails on test 6.

So just skip this thread.

Incidentally, I don't know how to fix my submission yet, but that's another thing :)