Lost Guy Radhu

my solution- https://ideone.com/KXp4Bv

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