Wrong Answer
/in/foo.cc: In function 'int main()':
/in/foo.cc:36:3: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
for(int j=i+1;j<=n;j++)
^~~
/in/foo.cc:38:4: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
sort(p+1,p+1+m,cmp);
^~~~