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 1019. Line Painting

What is the best algorithm for this problem? Could someone giveme an idea? (-)
Posted by Miguel Angel 17 Apr 2002 11:27
nothing is perfect 8-)
Posted by Alex[LSD] 30 Jun 2002 22:38
> I dont reall know for sure. Personally I stores every distinct
whyte line as a two-longit record. Whenever a black or a white line
is put, you cant get more than just one additional(new) distinct
white line(think why). So 5001 records should be enough. This is
something like a o(N^2) algorythm, at least it works good enough 8-))