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 1403. Courier

WA9
Posted by Carbon 6 Jan 2008 03:12
By my mind, my solution is right.
It builds a shedule of transporting with maximal money values superseding least values before that time.

But my solution falls on ninth test. I think that something wrong with that test.
Re: WA9
Posted by Aram Shatakhtsyan 10 Jan 2008 23:35
There are greedy simple solution.
Just sort works into descending order of profits
and process them sequentally.
Re: WA9
Posted by Carbon 30 Jan 2008 18:30
Oh! Thank you! I've got AC. My time is 0.001.
Re: WA9
Posted by Denis Koshman 28 Jul 2008 08:27
And then what in case of test?
1 3
2 9
Re: WA9
Posted by R1d1 28 Dec 2008 17:15
4
1 4
1 2
2 5
2 2
Answer:
2
1 3
Re: WA9
Posted by Alexander Georgiev 24 Aug 2010 14:31
More likely a test like:
4
2 2
2 3
3 4
3 5
will yield WA9.
Re: WA9
Posted by Dmitri Belous 21 Oct 2017 16:22
9
1 100
1 50
1 150
2 10
2 20
2 10
3 5
3 7
3 5
----------
3
3 5 8