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 1510. Order

Task 1510 - AV on test 7
Posted by Yuriy V. 14 Sep 2015 21:25
Could anyone helps me with test 7?

I wrote simple (dummy) solution - just store all input values in array - then sort it (qsort) - and write array[n/2].

I use free pascal.

On my PC program works correct. at least there no any runtime errors. I tested it with input N=1, 2, 3, 5, 1000, 500000. I enabled all checks like I/O, range check, stack check, overflow check, even init variables with garbage...

Could s/w get me any clue what can be wrong?

my last try - id 6409005
Re: Task 1510 - AV on test 7
Posted by Yuriy V. 16 Sep 2015 16:16
found error in my implementation of quick sort algorithm

[code deleted]
      i, j, x, y: Longword; // <-- change it to LongInt becouse in some cases it can
[code deleted]

Edited by moderator 24.11.2019 13:28