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 1047. Simple Calculations

I'd used binary search and got TL. ( Code here ) HELP!! Where is my mistake??
Posted by Alexander (201 - P TNU) 1 Feb 2008 20:52


Edited by author 19.02.2008 00:26
Re: I'd used binary search and got TL. ( Code here )
Posted by Alexander (201 - P TNU) 17 Feb 2008 03:08
Help!!!!!!!
Re: I'd used binary search and got TL. ( Code here )
Posted by CHIDEMYAN SERGEY 17 Feb 2008 19:17
It's part of my code:
{...}
int i,s=0,p=0;
for(i=0;i<n;i++)
{cin>>c;
p+=c;
s+=p;
}
At the end I use as answer:
(n*a+b-2*s)/(n+1),
where
a means a[0]
b means a[n+1]
Good luck!!!

Edited by author 17.02.2008 19:18
Re: I'd used binary search and got TL. ( Code here )
Posted by Alexander (201 - P TNU) 19 Feb 2008 00:24
Thank you!!! AC!!!