Test case failiure

code problem - https://ide.codingblocks.com/s/47678
problem statement - https://hack.codingblocks.com/contests/c/474/211
my last test case is failed. please help me to identify that case.
thank you

solution 2 - https://ide.codingblocks.com/s/47685
problem statement - https://hack.codingblocks.com/contests/c/474/215
in this part my output is not displaying . please guide me with the solution.

Hey Kushal, there are sum bugs in your code.

  1. inside for loop your code should be like this
    int o;
    cin>>o;
    A[i]=o;

you can’t write it as

  int o;
  A[i]=o;
  cin>>o;
  1. return type of findtriplets() should be void otherwise according to your code it will print only one triplet and return from there.

  2. to get the sorted output i.e. according to the output format you should sort the array first.

  3. your output should exactly match the output format character by character, you can use extra spaces or commas in printing the output.

I have corrected your code you can refer this.