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 1031. Railway Tickets

can DP solve this data?
Posted by cyc 31 Jul 2009 10:05
3 100 10000 100 101 102
35
1 34
0
3
3
3
...
3
99
100

i guess the answer is 201(1-35-34)
can DP give this answer? i think only ShortestPath can give this answer.
Re: can DP solve this data?
Posted by Sergey Lazarev (MSU Tashkent) 31 Jul 2009 15:03
It's wrong answer. Right answer is 101.
Re: can DP solve this data?
Posted by bill125 24 Jan 2012 09:35
I agree with you.

for example

1 2 100 100 100 1
4
2 3
2
3
99

when I used this input,my AC programm gave the answer 100 while the correct answer was 2
Re: can DP solve this data?
Posted by Smilodon_am [Obninsk INPE] 10 May 2012 20:35
Distances are different(!) integer numbers given in ascending order.
So this test isn't correct.

Edited by author 10.05.2012 20:35
Re: can DP solve this data?
Posted by sylap 26 Aug 2013 02:18
hey @bill125
if L2 < X ≤ L3  then cost is C3. // from table in problem statement
if  2 < X ≤ 100 then cost is 1 .
As X is 1 you can't use C3=1.