11237 - Halloween treats
Moderator: Board moderators
11237 - Halloween treats
Could somebody post any hint how to solve this problem without exceeding time limit ?
-
- Learning poster
- Posts: 74
- Joined: Sat Jul 15, 2006 6:28 am
- Location: CUET , bangladesh
- Contact:
I also get TLE. How i can improve....
Code: Select all
Cut after AC . I did not read the problem clearly.
Last edited by shakil on Mon Jul 30, 2007 12:07 pm, edited 2 times in total.
SHAKIL
mf had gived us good hint.
Heres a little io test. You may notice something (Think why my code outputs different from sample io ... and try to make a supposition..
Input
Output
----
Rio
Heres a little io test. You may notice something (Think why my code outputs different from sample io ... and try to make a supposition..
Input
Code: Select all
6 7
1 3 2 8 11 3 9
4 5
1 2 3 7 5
3 6
7 11 2 5 13 17
0 0
Code: Select all
1 2 3
2 3 4
1 2
Rio
Re: 11237 - Halloween treats
Is the most efficient solution O(c) ?
-
- New poster
- Posts: 4
- Joined: Wed Jun 18, 2008 1:40 am
Re: 11237 - Halloween treats
Hello,
Sorry I m really a novice here, but i m asking about: what do u mean by partial sums of a's???
Thanks
Sorry I m really a novice here, but i m asking about: what do u mean by partial sums of a's???
Thanks
Re: 11237 - Halloween treats
masteringminds wrote:Sorry I m really a novice here, but i m asking about: what do u mean by partial sums of a's???
The sequence 0, a[0], a[0]+a[1], a[0]+a[1]+a[2], ...
-
- New poster
- Posts: 4
- Joined: Wed Jun 18, 2008 1:40 am
Re: 11237 - Halloween treats
Thanks very much..your hints were very helpful and I got it AC from the first time which is Weird!! But it was nice at the first day of the new year!!
Thanks again,
Thanks again,
-
- New poster
- Posts: 1
- Joined: Sun Jan 01, 2012 7:47 am
Re: 11237 - Halloween treats
A easy problem...
only coding style is gonna save you... same methodology can bring you TLE or top ten(10) ranking based on how you code
only coding style is gonna save you... same methodology can bring you TLE or top ten(10) ranking based on how you code