Блог пользователя simp1eton

Автор simp1eton, 15 лет назад, По-английски
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 :)
  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

15 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится
It's based on a theorem from this paper
15 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится
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!