Comments

Same here. I have been spending a huge amount of time on several competitive programming sites but i always end up solving a certain kind of problems and being defeated by others.

However, I am not sure whether it is correct solution or not, But still there is something which you don't know (neither i) like- some kind of solving strategy for a certain problem, some algorithm designing strategy and programming tricks.

I think, you should take some training particularly in competitive programming. DigitalArtistKz has told a very nice way to train yourself. At least by that way you'll make sure that you will not get defeated by same kind of problem again and again.

Got it, It was my mistake. I wish, i had noticed that during contest. Even after solving i didn't submitted because it was not matching with sample test cases.

Ohh My mistake. I wish i had read that during contest time.Thank you for pointing out cdkrot. I had already solved that using Bubble sort but, i thought it is wrong since it was not matching with sample test cases.

It was not mentioned in the Problem statement that "any solution" that minimize the number of operations will be accepted.

But it is not mentioned in English version.

As Written on problem :

4
2 1 4 3

Output of 18671047

1 2 
3 4

How can it become correct ?

If it was right then check outputs of 18671047 . I am talking about sample testcases. Take a look at written outputs in sample testcases of problem and outputs of the submission (which has been accepted) .

In Codeforces Round 359 (Div. 2) Problem 686B - Зверинец маленькой разбойницы sample test cases Outputs were wrong. Correct me if i am wrong.

Can i use CHelper outside Codeforces too, Like on TopCoder ?

how can we make make automatic verification of sample test cases after compilation of code in IDE ? I saw it in screencast of Petr .