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 1066. Garland

new solution!!!
Posted by kirara1988 8 Mar 2009 13:23
H(i+1)-H(i)=H(i)-H(i-1)+2;

denote d(i)=H(i+1)-H(i)

you can get: d(i)=d(i-1)+2;

H(N)-H(1)=(N-1)d(1)+(N-1)(N-2);

H(i)-H(1)=(N-1)d(i)+(i-1)(i-2);

according to the above two equation, denote H(i)=0

you will get:H(N)=(N-i)*((N-1)-H1/(i-1));

the maximun of H(N) is the answer .so strange!

Edited by author 08.03.2009 15:00

Edited by author 08.03.2009 15:00