ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1252. Sorting the Tombstones

deLarry Admin! How Come! TEST4 N-1? [1] // Problem 1252. Sorting the Tombstones 26 Dec 2016 15:09
It says, that K is an amount of stones BETWEEN other stones. Why does Test4 answer equal n-1. I suppose it should be n-2, shouldn't it?

Edited by author 26.12.2016 16:46
Nguyen Thieu Khang Re: Admin! How Come! TEST4 N-1? // Problem 1252. Sorting the Tombstones 7 Aug 2020 18:41
You should read the problem statement more clearly. Since K<N, if the array is sorted then K=N-1.