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 1645. Ski Race

i don't understand why?
Posted by Rustam 25 Oct 2008 16:27
could you explain me test and answer? i can't understand how this situation may happen
Re: i don't understand why?
Posted by Rustam 27 Oct 2008 21:56
finally i understood the problem. solution is much easier than it's problem.
the problem's solution is very easy:
to find min: min[i] = i -count of a[j] where{j<i and a[j]>a[i]}
to find max: max[i] = n -count of a[j] where{j>i and a[j]>a[i]}
good luck!
Re: i don't understand why?
Posted by svr 27 Oct 2008 22:10
Much more harger and so important is to prove the result.
Re: i don't understand why?
Posted by Crusader 28 Oct 2008 08:14
here is my solution, i don't know why it is not correct and i always wa at #6

lowest:

min[i] = count of a[j] where{j>i and a[j]<a[i]} + 1

highest:

max[i] = n - count of a[j] where{j<i and a[j]>a[i]}

i need some help, thx.

Edited by author 28.10.2008 08:15
Re: i don't understand why?
Posted by Oleg Strekalovsky [Vologda SPU] 3 May 2009 15:45
Rustam wrote 27 October 2008 21:56
finally i understood the problem. solution is much easier than it's problem.
the problem's solution is very easy:
to find min: min[i] = i -count of a[j] where{j<i and a[j]>a[i]}
to find max: max[i] = n -count of a[j] where{j>i and a[j]>a[i]}
good luck!
I think there are some mistakes in your code.
For other: Don't look at this code. Think yourself (As I) :)
Re: i don't understand why?
Posted by Pegasus 18 Dec 2012 15:57
You are right,that anwer got Wa6