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 1363. Halftones

some interersting facts
Posted by Dmitry "Logam" Kobelev [TSOGU] 4 Aug 2008 23:09
while solving this problem I realized that changing the direction of moving led to the new answer.

for(int i = 1; i <= n; i++)
for(int j = 1; j <= m; j++)
{...some code...}
It is WA3

for(int i = 1; i <= m; i++)
for(int j = 1; j <= n; j++)
{...some code...}
It is WA25

for(int i = n; i >= 1; i--)
for(int j = m; j >= 1; j--)
{...some code...}
It is also WA25

for(int i = m; i >= 1; i--)
for(int j = n; j >= 1; j--)
{...some code...}
It is AC.

So, if you have wa25 or wa3 you may try to change indexe's direction )
Re: some interersting facts
Posted by Denis Koshman 7 Aug 2008 17:07
This means weak tests. But I wonder if there is a test which does not give result with all 4 directions.