-
Notifications
You must be signed in to change notification settings - Fork 0
/
Assignment 4 Sample Test Cases.txt
2116 lines (1946 loc) · 60.5 KB
/
Assignment 4 Sample Test Cases.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
run:
Test -----------------------------------
Input:
N1 = 0
Output:
Line: 0 238 322 217 353 325 175 78 9 338 308 347 294 218 206 106 231 368 360 80 274 81 178 159 147 191 194 276
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 1
Output:
Line: 1 12 213 235 284 211 86 21 75 142 339 151 13 5 239 27 246 302 366 204 85 351 56 362 256
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 2
Output:
Line: 2 110 332 203 317 133 60 299 304 33 344 315 220 316 369 58 307 215 42 190 269 301 88 181 139 355 306 157 291 141 197 199 104 271 193 25 253
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 3
Output:
Line: 3 262 210 95 292 361 208 333 334 323 222 330 73 70 165 375 310 342 65 121 124 14 64 192 337 268
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 4
Output:
Line: 4 171 264 286 370 189 367 103 327 132 223 289 38 336 309 8 350 312 229 305 285 115 263 114 251
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 6
Output:
Line: 6 55 127 109 50 77 356 227 173 67 135 331 16 119 295 212 275 328 43 66 258 166 252 102 130
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 7
Output:
Line: 7 290 136 68 311 129 20 283 146 247 357 278 183
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 10
Output:
Line: 10 277 82 87 300 341 169 63 123 250 44 162 59 224 282 228 255 71 254 345 149 241 49 164 244 352 184 260 266 261 237 179 161 364 365 363 108 152
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 11
Output:
Line: 11 154 349 99 358 346 174 221 74 195 47 148 117 54 145 373 196 259 198 52 201 36 37
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 15
Output:
Line: 15 318 48 182 126 272 131 153 245 168 326 202 51 137 359 321 100 207 113 234 249 273 187 188 72 39 267 180 112 319
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 17
Output:
Line: 17 288 118 329 46 242 40 297 219 313 140 122 125 340 143 160 226 270 134 374 29 28
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 18
Output:
Line: 18 163 105 296 205 94 200 257 265 167 53 372 186 185 91 90 89 61 335 107 314 343 32 303 298 225 177 79 138 158 371 156 76 111 35 172 240
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 19
Output:
Line: 19 236 214 93 97 23 287 62 216 243 83 128 324 96 293 101 209 232 348 45 155 98 26 230 354 30 150 57
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 22
Output:
Line: 22 84 24 120 69 281 176
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 31
Output:
Line: 31 41 34 248 280 92 144 170
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 116
Output:
Line: 116 233 320 279
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 0 N2 = 42
Output:
Time = 996
Path: 0 238 239 5 13 151 339 142 75 21 86 211 284 235 1 12 213 215 42
Input:
N1 = 0 N2 = 42 N3 = 1
Output:
Time = 1021
Path: 0 159 147 191 192 64 14 124 121 65 342 344 315 220 316 369 58 307 215 42
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 0 N2 = 247
Output:
Time = 766
Path: 0 238 239 5 13 151 339 142 144 31 41 34 248 247
Input:
N1 = 0 N2 = 247 N3 = 1
Output:
Time = 923
Path: 0 159 147 191 192 64 14 124 125 340 143 144 31 41 34 248 247
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 0 N2 = 247
Output:
Time = 766
Path: 0 238 239 5 13 151 339 142 144 31 41 34 248 247
Input:
N1 = 0 N2 = 247 N3 = 31
Output:
Time = 784
Path: 0 238 239 5 13 151 339 142 75 21 20 283 146 247
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 0 N2 = 288
Output:
Time = 957
Path: 0 159 147 191 192 64 14 124 125 122 140 313 219 297 40 17 288
Input:
N1 = 0 N2 = 288 N3 = 3
Output:
Time = 1051
Path: 0 238 322 217 353 325 175 78 77 356 227 173 67 135 331 16 17 288
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 0 N2 = 329
Output:
Time = 1047
Path: 0 159 147 191 192 64 14 124 125 122 140 313 219 297 40 17 288 118 329
Input:
N1 = 0 N2 = 329 N3 = 3
Output:
Time = 1125
Path: 0 238 322 217 353 325 175 78 9 338 308 347 346 174 221 74 195 47 148 117 118 329
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 7 N2 = 131
Output:
Time = 740
Path: 7 8 309 336 38 289 223 132 327 326 168 245 153 131
Input:
N1 = 7 N2 = 131 N3 = 4
Output:
Time = 1005
Path: 7 290 136 68 67 173 227 356 77 50 51 202 326 168 245 153 131
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 7 N2 = 172
Output:
Time = 951
Path: 7 8 309 336 38 289 223 225 177 79 138 158 371 156 76 111 35 172
Input:
N1 = 7 N2 = 172 N3 = 4
Output:
Time = 960
Path: 7 290 136 68 67 173 227 356 77 79 138 158 371 156 76 111 35 172
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 7 N2 = 213
Output:
Time = 523
Path: 7 311 315 220 316 369 58 307 215 213
Input:
N1 = 7 N2 = 213 N3 = 2
Output:
Time = 564
Path: 7 311 129 20 21 86 211 284 235 1 12 213
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 14 N2 = 15
Output:
Time = 865
Path: 14 13 5 239 27 246 245 153 131 272 126 182 48 318 15
Input:
N1 = 14 N2 = 15 N3 = 1
Output:
Time = 1125
Path: 14 64 192 191 147 159 0 238 322 217 353 325 326 168 245 153 131 272 126 182 48 318 15
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 14 N2 = 97
Output:
Time = 913
Path: 14 124 121 65 342 344 315 220 316 369 58 307 215 214 236 19 93 97
Input:
N1 = 14 N2 = 97 N3 = 2
Output:
Time = 914
Path: 14 124 121 65 342 343 314 107 335 61 18 163 105 296 205 94 93 97
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 21 N2 = 104
Output:
Time = 1271
Path: 21 20 129 311 315 344 33 304 299 60 133 317 203 332 110 2 139 355 306 157 291 141 197 199 104
Input:
N1 = 21 N2 = 104 N3 = 7
Output:
Time = 1411
Path: 21 75 142 339 341 169 63 123 250 44 162 59 60 133 317 203 332 110 2 139 355 306 157 291 141 197 199 104
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 21 N2 = 145
Output:
Time = 1143
Path: 21 20 129 311 7 290 136 68 70 73 330 222 221 174 346 358 99 349 154 11 54 145
Input:
N1 = 21 N2 = 145 N3 = 3
Output:
Time = 1174
Path: 21 20 129 311 314 343 32 303 298 225 177 79 138 158 371 156 154 11 54 145
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 21 N2 = 145
Output:
Time = 1143
Path: 21 20 129 311 7 290 136 68 70 73 330 222 221 174 346 358 99 349 154 11 54 145
Input:
N1 = 21 N2 = 145 N3 = 7
Output:
Time = 1330
Path: 21 86 211 284 285 305 229 312 350 8 309 310 375 165 70 73 330 222 221 174 346 358 99 349 154 11 54 145
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 21 N2 = 186
Output:
Time = 832
Path: 21 86 211 284 235 1 12 213 214 236 19 93 94 200 257 265 167 53 372 186
Input:
N1 = 21 N2 = 186 N3 = 19
Output:
Time = 867
Path: 21 86 211 284 235 1 12 213 212 295 296 205 94 200 257 265 167 53 372 186
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 21 N2 = 227
Output:
Time = 638
Path: 21 20 129 311 7 290 136 68 67 173 227
Input:
N1 = 21 N2 = 227 N3 = 7
Output:
Time = 890
Path: 21 86 211 284 235 1 12 213 212 295 119 16 331 135 67 173 227
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 21 N2 = 309
Output:
Time = 410
Path: 21 20 129 311 312 350 8 309
Input:
N1 = 21 N2 = 309 N3 = 7
Output:
Time = 523
Path: 21 86 211 284 285 305 229 312 350 8 309
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 21 N2 = 350
Output:
Time = 314
Path: 21 20 129 311 312 350
Input:
N1 = 21 N2 = 350 N3 = 7
Output:
Time = 427
Path: 21 86 211 284 285 305 229 312 350
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 28 N2 = 111
Output:
Time = 1464
Path: 28 29 374 134 270 226 160 143 340 341 169 63 123 250 44 162 59 224 225 177 79 138 158 371 156 76 111
Input:
N1 = 28 N2 = 111 N3 = 10
Output:
Time = 1495
Path: 28 29 374 134 270 226 160 143 340 125 122 121 65 342 343 32 303 298 225 177 79 138 158 371 156 76 111
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 28 N2 = 193
Output:
Time = 1695
Path: 28 29 374 134 270 226 160 143 340 341 169 63 123 250 44 162 59 60 133 317 203 332 110 2 139 355 306 157 291 141 197 199 104 271 193
Input:
N1 = 28 N2 = 193 N3 = 10
Output:
Time = 1786
Path: 28 29 374 134 270 226 160 143 340 125 122 121 65 342 344 33 304 299 60 133 317 203 332 110 2 139 355 306 157 291 141 197 199 104 271 193
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 28 N2 = 234
Output:
Time = 1389
Path: 28 29 374 134 270 226 160 143 340 125 122 121 65 342 310 375 165 70 73 330 222 323 334 333 208 207 113 234
Input:
N1 = 28 N2 = 234 N3 = 3
Output:
Time = 1601
Path: 28 29 374 134 270 226 160 143 142 339 151 13 5 239 27 246 245 168 326 202 51 137 359 321 100 207 113 234
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 28 N2 = 275
Output:
Time = 1056
Path: 28 29 374 134 270 226 160 143 142 75 21 86 211 284 235 1 12 213 212 275
Input:
N1 = 28 N2 = 275 N3 = 1
Output:
Time = 1223
Path: 28 29 374 134 270 226 160 143 340 125 122 140 313 315 220 316 369 58 307 215 212 275
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 28 N2 = 357
Output:
Time = 708
Path: 28 29 374 134 270 226 160 143 144 31 41 34 248 247 357
Input:
N1 = 28 N2 = 357 N3 = 31
Output:
Time = 816
Path: 28 29 374 134 270 226 160 143 142 75 21 20 283 146 247 357
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 35 N2 = 118
Output:
Time = 799
Path: 35 111 76 156 154 349 99 358 346 174 221 74 195 47 148 117 118
Input:
N1 = 35 N2 = 118 N3 = 11
Output:
Time = 950
Path: 35 111 76 156 155 45 348 232 209 101 293 96 324 128 83 243 242 46 329 118
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 35 N2 = 200
Output:
Time = 1101
Path: 35 111 76 156 155 45 348 232 209 101 293 96 324 128 83 243 216 62 287 23 97 93 94 200
Input:
N1 = 35 N2 = 200 N3 = 19
Output:
Time = 1162
Path: 35 111 76 156 371 158 138 79 77 356 227 173 67 135 331 16 18 163 105 296 205 94 200
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 35 N2 = 241
Output:
Time = 797
Path: 35 111 76 156 154 349 99 358 346 174 221 74 195 47 148 149 241
Input:
N1 = 35 N2 = 241 N3 = 11
Output:
Time = 923
Path: 35 111 76 156 155 45 348 232 209 101 293 96 324 128 83 243 244 164 49 241
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 35 N2 = 282
Output:
Time = 655
Path: 35 111 76 156 371 158 138 79 177 176 281 282
Input:
N1 = 35 N2 = 282 N3 = 22
Output:
Time = 662
Path: 35 111 76 156 371 158 138 79 177 225 224 282
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 35 N2 = 323
Output:
Time = 599
Path: 35 111 76 156 154 349 99 358 346 174 221 222 323
Input:
N1 = 35 N2 = 323 N3 = 11
Output:
Time = 608
Path: 35 111 76 156 155 45 348 232 209 208 333 334 323
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 35 N2 = 364
Output:
Time = 921
Path: 35 111 76 156 155 45 348 232 209 101 293 96 324 128 83 243 244 352 184 161 364
Input:
N1 = 35 N2 = 364 N3 = 19
Output:
Time = 1079
Path: 35 111 76 156 154 349 99 358 346 174 221 74 195 47 148 149 241 49 164 244 352 184 161 364
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 42 N2 = 207
Output:
Time = 914
Path: 42 215 214 236 19 93 97 23 287 62 216 243 83 128 324 96 293 101 209 207
Input:
N1 = 42 N2 = 207 N3 = 19
Output:
Time = 1013
Path: 42 215 212 295 119 16 331 135 67 70 73 330 222 323 334 333 208 207
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 42 N2 = 248
Output:
Time = 697
Path: 42 215 307 58 369 316 220 315 311 129 20 283 146 247 248
Input:
N1 = 42 N2 = 248 N3 = 7
Output:
Time = 814
Path: 42 215 213 12 1 235 284 211 86 21 75 142 144 31 41 34 248
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 42 N2 = 330
Output:
Time = 723
Path: 42 215 212 295 119 16 331 135 67 70 73 330
Input:
N1 = 42 N2 = 330 N3 = 6
Output:
Time = 781
Path: 42 215 307 58 369 316 220 315 344 342 310 375 165 70 73 330
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 42 N2 = 371
Output:
Time = 1006
Path: 42 215 212 295 119 16 331 135 67 173 227 356 77 79 138 158 371
Input:
N1 = 42 N2 = 371 N3 = 6
Output:
Time = 1026
Path: 42 215 307 58 369 316 220 315 314 343 32 303 298 225 177 79 138 158 371
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 49 N2 = 91
Output:
Time = 876
Path: 49 164 244 243 216 62 287 23 97 93 94 200 257 265 167 53 372 186 185 91
Input:
N1 = 49 N2 = 91 N3 = 19
Output:
Time = 1044
Path: 49 241 149 148 117 118 288 17 18 163 105 296 205 94 200 257 265 167 53 372 186 185 91
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 49 N2 = 296
Output:
Time = 652
Path: 49 164 244 243 216 62 287 23 97 93 94 205 296
Input:
N1 = 49 N2 = 296 N3 = 19
Output:
Time = 666
Path: 49 241 149 148 117 118 288 17 18 163 105 296
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 56 N2 = 139
Output:
Time = 329
Path: 56 57 150 30 354 355 139
Input:
N1 = 56 N2 = 139 N3 = 19
Output:
Time = 418
Path: 56 55 127 109 110 2 139
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 56 N2 = 221
Output:
Time = 760
Path: 56 55 127 109 50 77 78 9 338 308 347 346 174 221
Input:
N1 = 56 N2 = 221 N3 = 0
Output:
Time = 763
Path: 56 57 150 30 354 230 26 98 155 154 349 99 358 346 174 221
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 56 N2 = 221
Output:
Time = 760
Path: 56 55 127 109 50 77 78 9 338 308 347 346 174 221
Input:
N1 = 56 N2 = 221 N3 = 6
Output:
Time = 763
Path: 56 57 150 30 354 230 26 98 155 154 349 99 358 346 174 221
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 56 N2 = 262
Output:
Time = 925
Path: 56 57 150 30 354 230 26 98 155 45 348 232 209 101 293 292 95 210 3 262
Input:
N1 = 56 N2 = 262 N3 = 19
Output:
Time = 1001
Path: 56 55 127 109 50 51 137 359 321 100 207 208 361 292 95 210 3 262
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 56 N2 = 303
Output:
Time = 665
Path: 56 55 127 109 50 77 79 177 225 298 303
Input:
N1 = 56 N2 = 303 N3 = 6
Output:
Time = 686
Path: 56 351 85 204 366 367 103 327 132 223 225 298 303
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 56 N2 = 344
Output:
Time = 727
Path: 56 55 127 109 110 332 203 317 133 60 299 304 33 344
Input:
N1 = 56 N2 = 344 N3 = 6
Output:
Time = 746
Path: 56 351 85 204 366 367 103 327 132 133 60 299 304 33 344
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 63 N2 = 105
Output:
Time = 635
Path: 63 123 122 140 313 314 107 335 61 18 163 105
Input:
N1 = 63 N2 = 105 N3 = 17
Output:
Time = 681
Path: 63 123 121 65 342 343 314 107 335 61 18 163 105
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 63 N2 = 146
Output:
Time = 490
Path: 63 169 170 144 31 41 34 248 247 146
Input:
N1 = 63 N2 = 146 N3 = 31
Output:
Time = 533
Path: 63 169 341 339 142 75 21 20 283 146
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 63 N2 = 187
Output:
Time = 1009
Path: 63 123 121 65 342 310 375 165 70 73 330 222 323 334 333 208 207 113 234 249 273 187
Input:
N1 = 63 N2 = 187 N3 = 3
Output:
Time = 1169
Path: 63 123 250 44 162 59 224 225 177 79 138 137 359 321 100 207 113 234 249 273 187
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 63 N2 = 269
Output:
Time = 742
Path: 63 123 122 140 313 315 220 316 369 58 307 215 42 190 269
Input:
N1 = 63 N2 = 269 N3 = 17
Output:
Time = 797
Path: 63 123 121 65 342 344 315 220 316 369 58 307 215 42 190 269
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 63 N2 = 351
Output:
Time = 815
Path: 63 123 121 124 14 13 5 239 27 246 302 366 204 85 351
Input:
N1 = 63 N2 = 351 N3 = 3
Output:
Time = 829
Path: 63 169 341 339 151 13 5 239 27 246 302 366 204 85 351
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 70 N2 = 112
Output:
Time = 982
Path: 70 67 173 227 356 77 50 51 202 326 168 245 153 39 267 180 112
Input:
N1 = 70 N2 = 112 N3 = 6
Output:
Time = 983
Path: 70 165 375 310 309 336 38 289 223 132 327 326 168 245 153 39 267 180 112
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 70 N2 = 153
Output:
Time = 736
Path: 70 67 173 227 356 77 50 51 202 326 168 245 153
Input:
N1 = 70 N2 = 153 N3 = 6
Output:
Time = 737
Path: 70 165 375 310 309 336 38 289 223 132 327 326 168 245 153
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 70 N2 = 235
Output:
Time = 652
Path: 70 165 375 310 309 8 350 312 229 305 285 284 235
Input:
N1 = 70 N2 = 235 N3 = 4
Output:
Time = 719
Path: 70 67 135 331 16 119 295 212 213 12 1 235
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 70 N2 = 317
Output:
Time = 565
Path: 70 71 255 228 282 224 59 60 133 317
Input:
N1 = 70 N2 = 317 N3 = 10
Output:
Time = 582
Path: 70 165 375 310 342 344 33 304 299 60 133 317
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 77 N2 = 160
Output:
Time = 891
Path: 77 356 227 173 67 70 165 375 310 342 65 121 122 125 340 143 160
Input:
N1 = 77 N2 = 160 N3 = 3
Output:
Time = 921
Path: 77 79 177 225 224 59 162 44 250 123 63 169 341 340 143 160
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 77 N2 = 201
Output:
Time = 755
Path: 77 50 109 110 2 139 355 306 157 291 141 197 199 198 52 201
Input:
N1 = 77 N2 = 201 N3 = 2
Output:
Time = 792
Path: 77 79 138 158 371 156 154 11 54 145 373 196 259 198 52 201
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 77 N2 = 324
Output:
Time = 634
Path: 77 78 9 338 308 347 294 218 206 209 101 293 96 324
Input:
N1 = 77 N2 = 324 N3 = 0
Output:
Time = 718
Path: 77 50 51 137 359 321 100 207 209 101 293 96 324
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 84 N2 = 85
Output:
Time = 1107
Path: 84 22 120 69 67 173 227 356 77 50 109 127 55 56 351 85
Input:
N1 = 84 N2 = 85 N3 = 6
Output:
Time = 1168
Path: 84 22 120 69 281 282 224 223 132 327 103 367 366 204 85
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 84 N2 = 126
Output:
Time = 1246
Path: 84 22 120 69 281 176 175 325 326 168 245 153 131 272 126
Input:
N1 = 84 N2 = 126 N3 = 0
Output:
Time = 1309
Path: 84 22 120 69 281 282 224 223 132 327 326 168 245 153 131 272 126
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 84 N2 = 167
Output:
Time = 434
Path: 84 22 23 97 93 94 200 257 265 167
Input:
N1 = 84 N2 = 167 N3 = 19
Output:
Time = 553
Path: 84 22 120 119 295 296 205 94 200 257 265 167
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 84 N2 = 208
Output:
Time = 728
Path: 84 22 23 287 62 216 243 83 128 324 96 95 292 361 208
Input:
N1 = 84 N2 = 208 N3 = 19
Output:
Time = 788
Path: 84 22 120 69 70 73 330 222 323 334 333 208
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 84 N2 = 249
Output:
Time = 853
Path: 84 22 23 287 62 216 243 83 128 324 96 293 101 209 207 113 234 249
Input:
N1 = 84 N2 = 249 N3 = 19
Output:
Time = 999
Path: 84 22 120 69 70 73 330 222 323 334 333 208 207 113 234 249
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 84 N2 = 290
Output:
Time = 598
Path: 84 22 120 119 16 331 135 136 290
Input:
N1 = 84 N2 = 290 N3 = 6
Output:
Time = 655
Path: 84 22 120 69 68 136 290
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 84 N2 = 372
Output:
Time = 514
Path: 84 22 23 97 93 94 200 257 265 167 53 372
Input:
N1 = 84 N2 = 372 N3 = 19
Output:
Time = 633
Path: 84 22 120 119 295 296 205 94 200 257 265 167 53 372
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 91 N2 = 92
Output:
Time = 1179
Path: 91 185 186 372 53 167 265 257 200 94 205 296 105 163 18 61 335 107 314 311 129 20 283 146 247 248 280 92
Input:
N1 = 91 N2 = 92 N3 = 7
Output:
Time = 1376
Path: 91 185 186 372 53 167 265 257 200 94 93 19 236 214 213 12 1 235 284 211 86 21 75 142 144 31 41 34 248 280 92
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 91 N2 = 174
Output:
Time = 1071
Path: 91 185 186 372 53 167 265 257 200 94 205 296 105 163 18 17 288 118 117 148 47 195 74 221 174
Input:
N1 = 91 N2 = 174 N3 = 17
Output:
Time = 1136
Path: 91 185 186 372 53 167 265 257 200 94 205 296 105 163 18 16 331 135 67 70 73 330 222 221 174
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 91 N2 = 215
Output:
Time = 587
Path: 91 185 186 372 53 167 265 257 200 94 93 19 236 214 215
Input:
N1 = 91 N2 = 215 N3 = 19
Output:
Time = 622
Path: 91 185 186 372 53 167 265 257 200 94 205 296 295 212 215
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 91 N2 = 256
Output:
Time = 1420
Path: 91 185 186 372 53 167 265 257 200 94 205 296 105 163 18 16 331 135 67 173 227 356 77 50 109 127 55 56 362 256
Input:
N1 = 91 N2 = 256 N3 = 6
Output:
Time = 1672
Path: 91 185 186 372 53 167 265 257 200 94 205 296 105 163 18 61 335 107 314 343 32 303 298 225 223 132 327 103 367 366 204 85 351 56 362 256
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 91 N2 = 338
Output:
Time = 1163
Path: 91 185 186 372 53 167 265 257 200 94 205 296 105 163 18 16 331 135 67 173 227 356 77 78 9 338
Input:
N1 = 91 N2 = 338 N3 = 6
Output:
Time = 1265
Path: 91 185 186 372 53 167 265 257 200 94 93 97 23 287 62 216 243 83 128 324 96 293 101 209 206 218 294 347 308 338
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 98 N2 = 140
Output:
Time = 979
Path: 98 155 156 371 158 138 79 177 225 298 303 32 343 314 313 140
Input:
N1 = 98 N2 = 140 N3 = 18
Output:
Time = 1084
Path: 98 26 230 354 355 139 2 110 332 203 317 133 60 299 304 33 344 315 313 140
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 98 N2 = 222
Output:
Time = 503
Path: 98 155 154 349 99 358 346 174 221 222
Input:
N1 = 98 N2 = 222 N3 = 11
Output:
Time = 506
Path: 98 155 45 348 232 209 208 333 334 323 222
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 98 N2 = 263
Output:
Time = 1209
Path: 98 155 156 371 158 138 79 177 225 298 303 32 343 314 312 229 305 285 115 263
Input:
N1 = 98 N2 = 263 N3 = 18
Output:
Time = 1252
Path: 98 155 154 349 99 358 346 174 221 222 330 73 70 165 375 310 309 8 350 312 229 305 285 115 263
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 98 N2 = 304
Output:
Time = 739
Path: 98 155 156 371 158 138 79 177 225 298 303 304
Input:
N1 = 98 N2 = 304 N3 = 18
Output:
Time = 747
Path: 98 26 230 354 355 139 2 110 332 203 317 133 60 299 304
End of Test -----------------------------
Test -----------------------------------
Input:
N1 = 98 N2 = 345