Codeforces 246A. Buggy Sorting


Problem link

In this problem you should hack the sorting algorithm, of course it was incorrect. It was correct only for arrays with n <  = 2. In other cases you could print n, n–1, ..., 1 as a counter-example. To make the sorting right, the second cycle should be from 1 but not from i.

A solution in c++


Post a Comment

0 Comments