Ahnaf.Shahriar.Asif's blog

By Ahnaf.Shahriar.Asif, history, 6 years ago, In English

Hello , I can't realize why the judge output is much strange !!! problem link : http://codeforces.com/contest/451/problem/B

my code : https://paste.ubuntu.com/25939858/

judge status : http://codeforces.com/contest/451/submission/32225322

in my compiler , answer is okay , but where is the problem ?? I have also tested in different online compilers also

»
6 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by Ahnaf.Shahriar.Asif (previous revision, new revision, compare).

»
6 years ago, # |
  Vote: I like it 0 Vote: I do not like it

See, the problem is that you have to print the indicies of the elements to be swapped, not the elements themselves. You are printing elements instead.