$ javac DijkstraPath.java
$ java DijkstraPath < route01.data
45
0 3 6
$ java DijkstraPath < route02.data
204
0 4 3 7 10 14 15 16 19
$ java DijkstraPath < route03.data
213
0 4 5 10 15 20 24 25 29
$ java DijkstraPath < route04.data
47
0 150 200 240 332 229 300 400 557 466 500 600
$ java DijkstraPath < route05.data
70
0 150 200 240 332 229 300 400 557 466 500 600 764 786 700 800
$ java DijkstraPath < route12.data
693
[0, 29, 179, 180, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 491, 641, 642, 643, 644,
645, 646, 796, 946, 1096, 1097, 1247, 1397, 1547, 1697, 1698, 1848, 1998, 1999, 2149, 2299, 2449, 2599,
2600, 2601, 2602, 2603, 2753, 2754, 2904, 2905, 2906, 2907, 2908, 2909, 3059, 3060, 3210, 3360, 3361,
3362, 3512, 3662, 3812, 3813, 3963, 4113, 4114, 4115, 4265, 4415, 4416, 4566, 4567, 4717, 4867, 4868,
5018, 5019, 5169, 5170, 5320, 5321, 5322, 5323, 5324, 5474, 5624, 5625, 5626, 5776, 5926, 5927, 5928,
5929, 5930, 5931, 5932, 5933, 6083, 6084, 6085, 6086, 6236, 6237, 6238, 6388, 6389, 6539, 6689, 6839,
6989, 7139, 7140, 7290, 7291, 7441, 7442, 7443, 7593, 7743, 7744, 7745, 7895, 8045, 8046, 8047, 8048,
8049, 8199, 8349, 8350, 8500, 8650, 8651, 8801, 8951, 9101, 9102, 9252, 9253, 9403, 9404, 9554, 9704,
9854, 10004, 10005, 10155, 10156, 10157, 10158, 10008, 10009, 10010, 10160, 10161, 10162, 10163, 10313,
10314, 10464, 10614, 10615, 10616, 10617, 10767, 10917, 10918, 11068, 11069, 11219, 11220, 11370,
11520, 11670, 11671, 11672, 11822, 11823, 11824, 11825, 11975, 11976, 12126, 12276, 12426, 12576,
12577, 12727, 12728, 12878, 12879, 13029, 13030, 13031, 13181, 13331, 13332, 13482, 13483, 13633,
13783, 13933, 13934, 14084, 14234, 14384, 14534, 14684, 14685, 14686, 14836, 14837, 14838, 14839,
14989, 15139, 15289, 15290, 15291, 15441, 15591, 15741, 15891, 16041, 16191, 16341, 16342, 16492,
16642, 16792, 16942, 16943, 17093, 17094, 17244, 17394, 17544, 17694, 17844, 17845, 17846, 17996,
18146, 18296, 18446, 18596, 18746, 18896, 18897, 19047, 19048, 19049, 19199, 19349, 19499]
$ java DijkstraPath < route13.data
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at Dijkstra.main(Dijkstra.java:7)
$ java -Xms16g DijkstraPath < route13.data
22448
[0, 17, 27, 29, 279, 529, 779, 780, 1030, 1031, 1281, 1280, 1530, 1780, 2030, 2280, 2281, 2531, 2532,
2782, 2783, 3033, 3283, 3533, 3783, 4033, 4283, 4533, 4783, 4784, 5034, 5035, 5285, 5535, 5536, 5786,
6036, 6286, 6536, 6537, 6538, 6539, 6789, 7039, 7040, 7290, 7291, 7292, 7293, 7294, 7544, 7794, 7795,
7796, 8046, 8296, 8297, 8547, 8797, 9047, 9297, 9547, 9548, 9798, 10048, 10298, 10299, 10549, 10799,
10800, 10801, 10802, 10803, 10804, 10554, 10555, 10805, 10806, 11056, 11306, 11307, 11308, 11309,
11559, 11560, 11561, 11811, 12061, 12062, 12063, 12313, 12563, 12813, 13063, 13313, 13314, 13564,
13814, 14064, 14065, 14315, 14565, 14815, 14816, 15066, 15316, 15317, 15567, 15568, 15569, 15819,
15820, 15821, 15822, 15823, 15824, 15825, 16075, 16076, 16326, 16576, 16577, 16578, 16579, 16829,
16830, 17080, 17330, 17331, 17332, 17333, 17583, 17584, 17585, 17835, 17836, 17837, 18087, 18337,
18587, 18588, 18838, 19088, 19089, 19339, 19589, 19839, 20089, 20339, 20589, 20590, 20840, 20841,
21091, 21341, 21591, 21841, 21842, 21592, 21593, 21594, 21595, 21845, 21846, 22096, 22346, 22347,
22597, 22598, 22599, 22600, 22601, 22851, 23101, 23351, 23601, 23602, 23852, 23853, 23854, 24104,
24354, 24355, 24356, 24606, 24856, 25106, 25107, 25108, 25358, 25608, 25858, 26108, 26109, 26110,
26111, 26361, 26360, 26359, 26609, 26610, 26860, 27110, 27111, 27361, 27611, 27861, 28111, 28361,
28611, 28612, 28862, 28863, 28864, 28865, 29115, 29365, 29615, 29865, 30115, 30365, 30615, 30865,
31115, 31114, 31364, 31614, 31864, 32114, 32113, 32363, 32613, 32863, 33113, 33114, 33364, 33614,
33615, 33865, 34115, 34116, 34366, 34367, 34617, 34867, 34868, 35118, 35368, 35618, 35868, 36118,
36368, 36369, 36619, 36620, 36870, 37120, 37370, 37620, 37870, 37871, 38121, 38371, 38372, 38622,
38623, 38873, 39123, 39373, 39374, 39624, 39874, 40124, 40125, 40375, 40625, 40875, 41125, 41375,
41625, 41875, 42125, 42126, 42127, 42377, 42378, 42628, 42629, 42630, 42631, 42632, 42633, 42883,
43133, 43134, 43384, 43385, 43135, 43136, 42886, 42887, 43137, 43138, 43139, 43140, 43141, 42891,
42641, 42642, 42643, 42644, 42894, 43144, 43145, 43146, 43147, 43148, 43398, 43399, 43400, 43650,
43900, 44150, 44151, 44152, 44402, 44652, 44653, 44654, 44655, 44905, 44906, 44907, 44908, 44909,
44910, 45160, 45410, 45411, 45661, 45911, 46161, 46411, 46661, 46911, 47161, 47160, 47410, 47660,
47910, 48160, 48161, 48411, 48661, 48662, 48663, 48913, 48914, 48915, 49165, 49166, 49416, 49666,
49916, 50166, 50416, 50666, 50916, 51166, 51416, 51666, 51916, 51917, 52167, 52417, 52418, 52668,
52669, 52670, 52920, 52921, 53171, 53421, 53422, 53423, 53424, 53425, 53675, 53676, 53926, 53927,
54177, 54178, 54179, 54429, 54679, 54680, 54681, 54682, 54683, 54933, 54934, 55184, 55185, 55435,
55436, 55686, 55936, 55937, 56187, 56437, 56687, 56688, 56689, 56690, 56691, 56692, 56693, 56694,
56444, 56445, 56695, 56945, 56946, 57196, 57446, 57447, 57448, 57449, 57699, 57700, 57701, 57951,
58201, 58202, 58203, 58204, 58454, 58455, 58456, 58706, 58707, 58708, 58709, 58959, 59209, 59459,
59460, 59461, 59462, 59712, 59713, 59714, 59964, 60214, 60464, 60465, 60466, 60467, 60217, 60218,
60219, 60220, 60221, 60222, 60223, 60473, 60723, 60973, 61223, 61224, 61225, 61226, 61227, 61228,
61229, 61230, 61231, 61232, 61233, 61234, 61235, 60985, 60986, 60987, 60988, 60989, 60990, 60991,
60992, 60993, 61243, 61493, 61494, 61744, 61745, 61746, 61747, 61748, 61998, 62248, 62249, 62499]
|