Lost Guy Radhu

my solution- KXp4Bv - Online C++0x Compiler & Debugging Tool - Ideone.com

plz anyone explain where i’m going wrong. Although it matches the output still it showing wrong answer.

Here’s a randomly-chosen testcase your program fails on:

1 
6 6
25 29 9 28 37 49
6 5 2 1 4 3

The answer should be:

49
37
29
25
29
29
2 Likes

@ssjgz
Wow,
You ratings graph is a straight line with
~ +500/3 ratings/contest :clap::clap:
By this progress you will cross gennady soon :stuck_out_tongue::joy:

3 Likes

I can pretty much guarantee it’s going to start levelling off soon XD

2 Likes

@ssjgz @l_returns @ujjwalgupta303 @mrunal7 @pulkit_mittal

Hi guys, I need your help regarding understand the question. I am just a begineer.
I understand the problem but I am not able to understand how the input sample is calculated ?

input is :
1
5 3
5 4 8 6 9
2 3 5

Output printed is

5
8
9

As per the explanation is this

EXPLANATION:

  • For first thought, the maximum score is max(5,4)=5max(5,4)=5.
  • For second thought, the maximum score is max(5,4,8)=8max(5,4,8)=8.

But the first thought as per the input is not max(5,4) .

Could you guys please help me.

Yup the statement is bit ambiguous
Scores of each game is independent of each other.
The i’th score is the score of the i’th game and not the maximum of score till i’th game
The maximum score till qi’th game is asked to calculate