10389 - Subway

All about problems in Volume CIII. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

10389 - Subway

Postby _.B._ » Thu Aug 26, 2004 2:20 am

Greetings!
My code for this problem is now over 150 lines long, and I'm still getting WAs :o
I won't ask you to read it (yet :wink:)
Will you please give me some hints on this one?
Ah!, and some critical I/O too :P
Also, is my I/O for this test case alright?:

Input:
Code: Select all
5

0 0 10000 1000
0 200 5000 200 7000 200 -1 -1
2000 600 5000 600 10000 600 -1 -1

0 0 20000 2000
0 400 10000 400 14000 400 -1 -1
4000 1200 10000 1200 20000 1200 -1 -1

1 1 10001 1001
0 200 5000 200 7000 200 -1 -1
2000 600 5000 600 10000 600 -1 -1

0 0 10000 1000
0 200 5000 200 7000 200 -1 -1
2000 600 5000 600 10000 600 -1 -1
0 0 10000 999 -1 -1

0 0 0 0
0 200 5000 200 7000 200 -1 -1
2000 600 5000 600 10000 600 -1 -1


Output:
Code: Select all
21

42

21

15

0


Thanks in advance!
[color=darkgreen][b]_.
User avatar
_.B._
Experienced poster
 
Posts: 160
Joined: Sat Feb 07, 2004 7:50 pm
Location: Venezuela

10389 : what are the outputs ???

Postby L I M O N » Tue Jan 31, 2006 9:09 pm

pls someone gives the correct outputs of those following data:

Code: Select all
10

18467 41 26500 6334
19169 15724 11478 29358 26962 24464 5705 28145 23281 16827 9961 491 2995 11942 4827 5436 32391 14604 3902 153 -1 -1
292 12382 17421 18716 19718 19895 5447 21726 14771 11538 1869 19912 25667 26299 17035 9894 28703 23811 31322 30333 -1 -1
17673 4664 15141 7711 28253 6868 25547 27644 32662 32757 20037 12859 8723 9741 27529 778 12316 3035 22190 1842 -1 -1

30106 288 8942 9040
19264 22648 27446 23805 15890 6729 24370 15350 15006 31101 24393 3548 19629 12623 24084 19954 18756 11840 4966 7376 -1 -1
13931 26308 16944 32439 24626 11323 5537 21538 16118 2082 22929 16541 4833 31115 4639 29658 22704 9930 13977 2306 -1 -1
31673 22386 5021 28745 26924 19072 6270 5829 26777 15573 5097 16512 23986 13290 9161 18636 22355 24767 23655 15574 -1 -1

12052 4031 1150 27350
16941 21724 13966 3430 31107 30191 18007 11337 15457 12287 27753 10383 14945 8909 32209 9758 24221 18588 6422 24946 -1 -1
27506 13030 16413 29168 900 32591 18762 1655 17410 6359 27624 20537 21548 6483 27595 4041 3602 24350 10291 30836 -1 -1
9374 11020 4596 24021 27348 23199 19668 24484 8281 4734 53 1999 26418 27938 6900 3788 18127 467 3728 14893 -1 -1

22483 24648 2421 17807
14310 6617 22813 9514 14309 7616 18935 17451 20600 5249 16519 31556 22798 30303 6224 11008 5844 32609 14989 32702 -1 -1
3195 20485 3093 14343 30523 1587 29314 9503 7448 25200 13458 6618 20580 19796 14798 15281 19589 20798 28009 27157 -1 -1
20472 23622 18538 12292 6038 24179 18190 29657 7958 6191 19815 22888 19156 11511 16202 2634 24272 20055 20328 22646 -1 -1

4886 26362 28433 18875
29869 20142 23844 1416 21881 31998 10322 18651 10021 5699 3557 28476 27892 24389 5075 10712 2600 2510 21003 26869 -1 -1
17861 14688 13401 9789 15255 16423 5002 10585 24182 10285 27088 31426 28617 23757 9832 30932 4169 2154 25721 17189 -1 -1
19976 31329 2368 28692 21425 10555 3434 16549 7441 9512 30145 18060 21718 3753 16139 12423 16279 25996 16687 12529 -1 -1

17437 22549 12949 19866
193 23195 3297 20416 28286 16105 24488 16282 12455 25734 18114 11701 31316 20671 5786 12263 4313 24355 31185 20053 -1 -1
912 10808 1832 20945 4313 27756 28321 19558 23646 27982 481 4144 23196 20222 7129 2161 5535 20450 11173 10466 -1 -1
12044 21659 26292 26439 17253 20024 26154 29510 4745 20649 13186 8313 4474 28022 2168 14018 18787 9905 17958 7391 -1 -1

3625 10202 4414 26477
9314 25824 29334 25874 24372 20159 11833 28070 7487 28297 7518 8177 17773 32270 1763 2668 17192 13985 3102 8480 -1 -1
29213 7627 4802 4099 30527 2625 1543 1924 11023 29972 13061 14181 31003 27432 17505 27593 22725 13031 8492 142 -1 -1
17222 31286 13064 7900 19187 8360 22413 30974 14270 29170 235 30833 19711 25760 18896 4667 7285 12550 140 13694 -1 -1

21624 2695 2125 28019
26576 21694 22658 26302 17371 22466 4678 22593 23851 25484 1018 28464 21119 23152 2800 18087 31060 1926 9010 4757 -1 -1
32170 20315 9576 30227 12043 22758 7164 5109 7882 17086 29565 3487 29577 14474 2625 25627 5629 31928 25423 28520 -1 -1
6902 14962 123 24596 3737 13261 10195 32525 1264 8260 6202 8116 5030 20326 29011 30771 6411 25547 21153 21520 -1 -1

0 0 0 10
-1 -1

0 0 0 0
100 100 -1 -1


my program gives :
Code: Select all
48

95

81

68

68

31

63

115

0

0

i m getting WA again again
L I M O N
Learning poster
 
Posts: 58
Joined: Wed Dec 31, 2003 8:43 am
Location: Dhaka, Bangladesh

Postby Moha » Tue Apr 04, 2006 4:27 pm

When I used sstream to read the input, I got WA, now I change it to my own reader, I got accepted, I think sstream does not work here! This may be help you!
Moha
Experienced poster
 
Posts: 216
Joined: Tue Aug 31, 2004 1:02 am
Location: Tehran

Postby Moha » Tue Apr 04, 2006 4:33 pm

All of my outputs from my Accepted solution differ from your ouput, except 9th and 10th, in which my solution crash on them, I think there is no such a testcase in the judge data.
my output is:
    61

    109

    94

    101

    85

    31

    78

    123
Moha
Experienced poster
 
Posts: 216
Joined: Tue Aug 31, 2004 1:02 am
Location: Tehran

Postby Jan » Fri Jun 02, 2006 6:00 pm

To LIMON,

I think you haven't understood the problem clearly.

The problem states -

You may assume the subway runs in a straight line between adjacent stops, and the coordinates represent an integral number of metres.


:wink: I believe thats the only trick in this problem. Hope you got it.
Ami ekhono shopno dekhi...
HomePage
Jan
Guru
 
Posts: 1334
Joined: Wed Jun 22, 2005 10:58 pm
Location: Dhaka, Bangladesh

Re: 10389 - Subway

Postby Articuno » Fri Dec 11, 2009 7:17 pm

Can anyone say what does this line in the problen description means.. I don't get it
You may assume the subway runs in a straight line between adjacent stops, and the coordinates represent an integral number of metres.
Help will be appreciated. Thanks
May be tomorrow is a better day............ :)
Articuno
Learning poster
 
Posts: 78
Joined: Sun Nov 30, 2008 5:00 pm
Location: IUT-OIC, Dhaka, Bangladesh

Re: 10389 - Subway

Postby razor » Mon May 07, 2012 10:05 am

it means if you have subway line description like this:
0 0 0 1 1 0 -1 -1
then, you cannot using subway directly from (0,0) to (1, 0) .
razor
New poster
 
Posts: 3
Joined: Wed Oct 19, 2011 6:48 pm


Return to Volume CIII

Who is online

Users browsing this forum: No registered users and 0 guests