simp1eton's blog

By simp1eton, 15 years ago, In English
Hi all,

I refer you to the following problem.

http://www.codeforces.com/contest/10/problem/E

I tried reading the codes of people who solved the problem, but the codes are pretty cryptic to me. Can someone please enlighten me? Thanks :)
  • Vote: I like it
  • 0
  • Vote: I do not like it

15 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it
It's based on a theorem from this paper
15 years ago, hide # |
Rev. 2  
Vote: I like it 0 Vote: I do not like it
Wow thanks! I will read this paper carefully.

But is there another way to solve this problem without prior knowledge? It gets a bit daunting if the only way to solve problems is to know some obscure formula beforehand :S

Or maybe, is there an intuitive way from which one can derive the algorithm?

Thanks in advance!
  • 15 years ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it
    I don't know… During the contest I came to some conclusions similar to the proof in the paper, so in principle it's possible to obtain it independently. It's only 1 page long, after all.