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

What's wrong with #6 test?
Posted by Intelligent_Design 30 Oct 2006 01:25
Hey, I wrote this code, but it fails on the 6th test... What can be my error?

[code deleted]

Edited by moderator 29.12.2006 09:21
6th test is correct. Test your code more carefully. (-)
Posted by Sandro (USU) 30 Oct 2006 21:05
Re: 6th test is correct. Test your code more carefully. (-)
Posted by mai7 1 Nov 2006 03:28
I don't know how I did it, I had same code and same was the trouble (WA 6)! I'd also taken into consideration the condition that more than half of numbers are equal.

[code deleted]

Edited by moderator 29.12.2006 09:21
Re: 6th test is correct. Test your code more carefully. (-)
Posted by Ilia S. Chm (Spb SU) 3 Nov 2006 02:55
AC solution: use qsort(A) and then output A[n/2]