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

You CAN got AC with RANDOM method, but you need to be more careful.
Posted by 198808xc 16 Sep 2010 23:03
The testcases, after rejudgement, are harder than before. So I really wonder if simply randomization could get AC.

I first wrote a program WHOLLY random, and got WA at 4.
Then I added the checking part of my program. When one-round randomization failed, I will start another, and so on. Then I got TLE at 14, 15 or 19 (I have tried about 10 times).
Finally, I realised that I must modify the random part. So I made a improvement: when I try to find the value of one pixel, I will take the PROCESSED pixel which could have the impression on that pixel into consideration. And I will adjust the random argument basing on these infos. This time I got AC.

Wish my method will be helpful.