Pair of roses problem

code link : https://ide.codingblocks.com/s/358768

hey can you please check the problem in my code, it gives wrong answer, but works perfectly in ide

Hey @shivanshu12800
Start 2nd loop from i+1 otherwise both element can be same
Say
Tc was
1
3
0 10 20
20

Here ans should be 0 20

If this resolves your query then please mark it as resolved :slight_smile: