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 1682. Crazy Professor

Could anyone help with O(n) algorithm for this problem?
Posted by Sfairat 5 Mar 2009 19:18
Subj
I've been thinking on this problem for several days,but I still can't find such algorithm(

Edited by author 05.03.2009 19:59
Re: Could anyone help with O(n) algorithm for this problem?
Posted by Al.Cash 6 Mar 2009 02:48
Just emulate the professor's operations using some precalculation...