Need help in this problem

link to problem : Contest Page | CodeChef
WA : Solution: 45725006 | CodeChef

IF ANY INTELLIGENT PERSON CAN FIND MISTAKE … PLZ TELL …

Try this test case.

TEST CASE
1
5 5
2583 2667 2652 2650 2648
-10 3 10 5 -10
8 9 3 -10 -8
-9 -4 9 10 5
2 4 -8 4 -6
-6 -6 -9 6 -4

YOUR OUTPUT
5
CORRECT OUTPUT
4

I think it’s concise enough for you to debug this code.

2 Likes

clickbait ???

1 Like
2583 2667  2652 2650 2648

2573 2576 2586 2591 2581 = 4
2675 2684 2687 2677 2669 = 3
2643 2639 2648 2658 2663 = 5
2652 2656 2648 2652 2646 = 2
2642 2636 2627 2633 2629 = 1

5 5 4 5 5 = 3
1 1 1 1 1 = 1
3 3 2 2 2 = 3
2 2 2 3 3 = 1
4 4 3 4 4 = 3

here i write the rating table as well as the ranking table . given in the question u have to see the first highest rank month and not the later one. according to me , answer should be 5 only thats what my code output.
is there something i am missing .?? how is the correct output 4 ??

  • if there are 6 players with a rating 2000, 2000, 2000, 1800, 1800, 17002000,2000,2000,1800,1800,1700 then their corresponding ranks will be (1, 1, 1, 4, 4, 61,1,1,4,4,6) Note the rank of the players, I think many people made the mistake in computing ranks

oh got it… here what i am missing…
sorry … silly error

Updated answer : Solution: 45734447 | CodeChef

thanks for Your help …
appreciated…
:blush:

“U can’t solve this” - bloody hell, title your post better next time.

Try to fix your language, before commenting on others is all I’ll say.