Page 2 of 2
Posted: Fri Aug 18, 2006 3:39 pm
by Darko
Well, you add all neutral values to only one total, maybe any time you update sequences you should add neutrals to it and reset it to 0 (or something like that).
It is exactly why it fails on those two cases.
And - please don't create new thread if one already exists.
7 6 6 6 6 7 3 2 1 2 0
Posted: Sun Sep 03, 2006 9:32 pm
by boshkash1986
7 6 6 6 6 7 3 2 1 2 0
concernig this input my accepted program gives me a different answer than yours . (it really confused me)
my output
we disagree in the down ration you say it is 7 and i say it is 3.50
7->6 (count down)
6->6 (count down)
6->6 (countdown)
6->6 (count down) (count sequence down)
6->7(count up) (count seq up)
7->3(count down)
3->2 (count down)
2->1(count down)(count seq down)
1->2(count up) (count seq up)
so u have 7 down numbers in form of two sequence and so u got 3.500
am i correct?
413-Up Down Sequence
Posted: Thu Oct 19, 2006 5:18 pm
by iishaque
HI
I tried but I faled to understand the problem. If any one please explain the problem. I can not understand the input output.
PLZ HELP ME 
Re: help..help..hellllppp!!!! 413
Posted: Fri Sep 12, 2008 11:48 am
by turcse143
Here is some input-output. I got PE.ples help.
input:
Code: Select all
1 2 3 0
3 2 1 0
1 2 3 2 1 0
2 2 2 2 3 0
4 4 4 4 3 0
4 4 4 3 3 3 3 0
4 4 4 3 3 3 4 0
5 5 5 5 0
1 2 3 2 3 4 5 0
0
Output:
Code: Select all
Nr values = 3: 2.000000 0.000000
Nr values = 3: 0.000000 2.000000
Nr values = 5: 2.000000 2.000000
Nr values = 5: 4.000000 0.000000
Nr values = 5: 0.000000 4.000000
Nr values = 7: 0.000000 6.000000
Nr values = 7: 1.000000 5.000000
Nr values = 4: 0.000000 0.000000
Nr values = 7: 2.500000 1.000000
Press any key to continue
Is there any mistake?
Re: help..help..hellllppp!!!! 413
Posted: Sun Sep 14, 2008 4:29 pm
by turcse143
I got it . it was a little mistake.
Re: help..help..hellllppp!!!! 413
Posted: Sun Sep 14, 2008 4:33 pm
by turcse143
I got it . it was a little mistake.
Re: 413 - Up and Down Sequences
Posted: Wed Mar 16, 2016 3:59 am
by anacharsis
How can the answer to the 4th test case:
2 2 2 2 3 0
possibly be:
Nr values = 5: 4.000000 0.000000
Since there are 4 2's followed by a three, I see 5 "up" series of length 1, 2, 3, 4, 5.
So, given that there are 5, shouldn't the average length be 3??
Since so many have gotten this one, and no one is complaining about the sample IO, I assume it's right.
I must be understanding this wrong then.
Can someone please explain the correct way to think about this?
Thanks!
Re: 413 - Up and Down Sequences
Posted: Tue Jul 19, 2016 5:13 pm
by metaphysis
The problem statement is not so clear.