feat: new graph problems formatted.
This commit is contained in:
97
quase-menor-caminho/Makefile
Normal file
97
quase-menor-caminho/Makefile
Normal file
@@ -0,0 +1,97 @@
|
||||
# Normal directories
|
||||
SRC_DIR := src
|
||||
BIN_DIR := bin
|
||||
DBG_DIR := bin/debug
|
||||
|
||||
# Grader directories
|
||||
GRADER := $(wildcard $(SRC_DIR)/grader.cpp)
|
||||
GRADER_DIR := $(SRC_DIR)/grader
|
||||
HANDLER_DIR := $(SRC_DIR)/handler
|
||||
|
||||
GRADER_SRC := $(wildcard $(GRADER_DIR)/*.cpp)
|
||||
GRADER_BIN := $(patsubst $(GRADER_DIR)/%.cpp, $(BIN_DIR)/%, $(GRADER_SRC))
|
||||
GRADER_DBG := $(patsubst $(GRADER_DIR)/%.cpp, $(DBG_DIR)/%, $(GRADER_SRC))
|
||||
|
||||
# Change CPP source directories if grader is defined
|
||||
ifdef GRADER
|
||||
SRC := $(wildcard $(HANDLER_DIR)/*.cpp)
|
||||
BIN := $(patsubst $(HANDLER_DIR)/%.cpp, $(BIN_DIR)/%, $(SRC))
|
||||
DBG := $(patsubst $(HANDLER_DIR)/%.cpp, $(DBG_DIR)/%, $(SRC))
|
||||
else
|
||||
SRC := $(wildcard $(SRC_DIR)/*.cpp)
|
||||
BIN := $(patsubst $(SRC_DIR)/%.cpp, $(BIN_DIR)/%, $(SRC))
|
||||
DBG := $(patsubst $(SRC_DIR)/%.cpp, $(DBG_DIR)/%, $(SRC))
|
||||
endif
|
||||
|
||||
SRC_C := $(wildcard $(SRC_DIR)/*.c)
|
||||
BIN_C := $(patsubst $(SRC_DIR)/%.c, $(BIN_DIR)/%, $(SRC_C))
|
||||
DBG_C := $(patsubst $(SRC_DIR)/%.c, $(DBG_DIR)/%, $(SRC_C))
|
||||
|
||||
SRC_JAVA := $(wildcard $(SRC_DIR)/*.java)
|
||||
BIN_JAVA := $(patsubst $(SRC_DIR)/%.java, $(BIN_DIR)/%.class, $(SRC_JAVA))
|
||||
DBG_JAVA := $(patsubst $(SRC_DIR)/%.java, $(DBG_DIR)/%.class, $(SRC_JAVA))
|
||||
|
||||
CHECKER := $(wildcard $(SRC_DIR)/checker.cpp)
|
||||
|
||||
C := gcc
|
||||
CPP := g++
|
||||
CXX_FLAGS := -Wall -O2
|
||||
DEBUG_FLAGS := -Wall -g
|
||||
BOCA_FLAGS := -static -DBOCA_SUPPORT
|
||||
|
||||
JV = javac
|
||||
JV_DEBUG = -g
|
||||
JV_DIR = -d bin
|
||||
JV_DBG_DIR = -d bin/debug
|
||||
|
||||
.PHONY: all debug release checker clean
|
||||
|
||||
all: debug release checker
|
||||
|
||||
debug: $(DBG) $(DBG_C) $(DBG_JAVA) $(GRADER_DBG)
|
||||
|
||||
release: $(BIN) $(BIN_C) $(BIN_JAVA) $(GRADER_BIN)
|
||||
|
||||
ifdef CHECKER
|
||||
checker: $(DBG_DIR)/checker-boca $(BIN_DIR)/checker-boca
|
||||
endif
|
||||
|
||||
$(BIN): $(BIN_DIR)/% : $(SRC_DIR)/%.cpp | $(BIN_DIR)
|
||||
$(CPP) $(CXX_FLAGS) $^ -o $@
|
||||
|
||||
$(DBG): $(DBG_DIR)/% : $(SRC_DIR)/%.cpp | $(DBG_DIR)
|
||||
$(CPP) $(DEBUG_FLAGS) $^ -o $@
|
||||
|
||||
$(BIN_C): $(BIN_DIR)/% : $(SRC_DIR)/%.c | $(BIN_DIR)
|
||||
$(C) $(CXX_FLAGS) $^ -o $@
|
||||
|
||||
$(DBG_C): $(DBG_DIR)/% : $(SRC_DIR)/%.c | $(DBG_DIR)
|
||||
$(C) $(DEBUG_FLAGS) $^ -o $@
|
||||
|
||||
$(BIN_JAVA): $(BIN_DIR)/%.class : $(SRC_DIR)/%.java | $(BIN_DIR)
|
||||
$(JV) $(JV_DIR) $^
|
||||
|
||||
$(DBG_JAVA): $(DBG_DIR)/%.class : $(SRC_DIR)/%.java | $(DBG_DIR)
|
||||
$(JV) $(JV_DEBUG) $(JV_DBG_DIR) $^
|
||||
|
||||
$(GRADER_BIN): $(BIN_DIR)/% : $(GRADER_DIR)/%.cpp $(GRADER) $(GRADER_DIR)/*.h
|
||||
$(CPP) $(CXX_FLAGS) $^ -o $@
|
||||
|
||||
$(GRADER_DBG): $(DBG_DIR)/% : $(GRADER_DIR)/%.cpp $(GRADER) $(GRADER_DIR)/*.h
|
||||
$(CPP) $(DEBUG_FLAGS) $^ -o $@
|
||||
|
||||
$(BIN_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
$(DBG_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
$(BIN_DIR)/checker-boca: $(SRC_DIR)/checker.cpp
|
||||
$(CPP) $(CXX_FLAGS) $(BOCA_FLAGS) $^ -o $@
|
||||
|
||||
$(DBG_DIR)/checker-boca: $(SRC_DIR)/checker.cpp
|
||||
$(CPP) $(DEBUG_FLAGS) $(BOCA_FLAGS) $^ -o $@
|
||||
|
||||
clean:
|
||||
@echo Cleaning problem files
|
||||
rm -rf bin
|
||||
BIN
quase-menor-caminho/image.png
Normal file
BIN
quase-menor-caminho/image.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.5 KiB |
30
quase-menor-caminho/input/1
Normal file
30
quase-menor-caminho/input/1
Normal file
@@ -0,0 +1,30 @@
|
||||
7 9
|
||||
0 6
|
||||
0 1 1
|
||||
0 2 1
|
||||
0 3 2
|
||||
0 4 3
|
||||
1 5 2
|
||||
2 6 4
|
||||
3 6 2
|
||||
4 6 4
|
||||
5 6 1
|
||||
4 6
|
||||
0 2
|
||||
0 1 1
|
||||
1 2 1
|
||||
1 3 1
|
||||
3 2 1
|
||||
2 0 3
|
||||
3 0 2
|
||||
6 8
|
||||
0 1
|
||||
0 1 1
|
||||
0 2 2
|
||||
0 3 3
|
||||
2 5 3
|
||||
3 4 2
|
||||
4 1 1
|
||||
5 1 1
|
||||
3 0 1
|
||||
0 0
|
||||
363
quase-menor-caminho/input/10
Normal file
363
quase-menor-caminho/input/10
Normal file
@@ -0,0 +1,363 @@
|
||||
40 25
|
||||
14 32
|
||||
14 13 10
|
||||
13 34 8
|
||||
34 9 2
|
||||
9 23 13
|
||||
23 8 16
|
||||
8 19 16
|
||||
19 31 6
|
||||
31 12 4
|
||||
12 0 12
|
||||
0 16 3
|
||||
16 32 3
|
||||
1 35 602
|
||||
3 5 912
|
||||
4 7 330
|
||||
10 2 111
|
||||
11 20 678
|
||||
11 26 408
|
||||
13 36 107
|
||||
14 22 70
|
||||
15 35 748
|
||||
20 16 381
|
||||
21 11 492
|
||||
24 15 491
|
||||
25 14 141
|
||||
25 34 293
|
||||
29 31
|
||||
0 28
|
||||
0 1 1
|
||||
1 2 1
|
||||
2 3 1
|
||||
3 4 1
|
||||
4 5 1
|
||||
5 6 1
|
||||
6 7 1
|
||||
7 8 1
|
||||
8 9 1
|
||||
9 10 1
|
||||
10 11 1
|
||||
11 12 1
|
||||
12 13 1
|
||||
13 14 1
|
||||
14 15 1
|
||||
15 16 1
|
||||
16 17 1
|
||||
17 18 1
|
||||
18 19 1
|
||||
19 20 1
|
||||
20 21 1
|
||||
21 22 1
|
||||
22 23 1
|
||||
23 24 1
|
||||
24 25 1
|
||||
25 26 1
|
||||
26 27 1
|
||||
27 28 1
|
||||
0 28 32
|
||||
0 2 3
|
||||
2 28 29
|
||||
29 31
|
||||
0 28
|
||||
0 1 1
|
||||
1 2 1
|
||||
2 3 1
|
||||
3 4 1
|
||||
4 5 1
|
||||
5 6 1
|
||||
6 7 1
|
||||
7 8 1
|
||||
8 9 1
|
||||
9 10 1
|
||||
10 11 1
|
||||
11 12 1
|
||||
12 13 1
|
||||
13 14 1
|
||||
14 15 1
|
||||
15 16 1
|
||||
16 17 1
|
||||
17 18 1
|
||||
18 19 1
|
||||
19 20 1
|
||||
20 21 1
|
||||
21 22 1
|
||||
22 23 1
|
||||
23 24 1
|
||||
24 25 1
|
||||
25 26 1
|
||||
26 27 1
|
||||
27 28 1
|
||||
0 28 32
|
||||
0 2 3
|
||||
2 28 29
|
||||
35 267
|
||||
0 34
|
||||
0 1 1
|
||||
0 11 1
|
||||
1 23 2
|
||||
11 23 2
|
||||
23 34 2
|
||||
0 34 8
|
||||
0 23 6
|
||||
1 34 7
|
||||
0 5 38
|
||||
0 13 829
|
||||
0 17 304
|
||||
0 18 183
|
||||
0 20 798
|
||||
0 25 858
|
||||
0 27 180
|
||||
0 30 578
|
||||
0 31 245
|
||||
0 32 177
|
||||
1 0 399
|
||||
1 8 310
|
||||
1 10 758
|
||||
1 19 663
|
||||
1 20 613
|
||||
1 22 117
|
||||
2 11 100
|
||||
2 13 804
|
||||
2 15 478
|
||||
2 24 149
|
||||
2 25 354
|
||||
3 2 37
|
||||
3 13 320
|
||||
3 14 696
|
||||
3 17 748
|
||||
3 28 995
|
||||
3 31 955
|
||||
3 32 698
|
||||
4 1 543
|
||||
4 23 632
|
||||
4 25 922
|
||||
4 26 129
|
||||
5 3 439
|
||||
5 4 214
|
||||
5 13 91
|
||||
5 14 996
|
||||
5 15 373
|
||||
5 21 80
|
||||
5 22 303
|
||||
5 23 243
|
||||
5 27 45
|
||||
5 34 243
|
||||
6 8 573
|
||||
6 9 143
|
||||
6 15 956
|
||||
6 16 495
|
||||
6 18 260
|
||||
6 21 414
|
||||
6 22 668
|
||||
6 26 976
|
||||
7 2 389
|
||||
7 14 612
|
||||
7 16 380
|
||||
7 25 180
|
||||
7 28 851
|
||||
7 29 468
|
||||
7 31 499
|
||||
7 32 991
|
||||
7 33 923
|
||||
8 9 942
|
||||
8 15 818
|
||||
8 17 531
|
||||
8 20 757
|
||||
8 23 385
|
||||
9 0 105
|
||||
9 3 267
|
||||
9 4 840
|
||||
9 5 797
|
||||
9 6 148
|
||||
9 13 176
|
||||
9 16 379
|
||||
9 19 27
|
||||
9 21 242
|
||||
9 26 13
|
||||
9 29 734
|
||||
9 32 842
|
||||
9 34 730
|
||||
10 1 578
|
||||
10 4 241
|
||||
10 6 533
|
||||
10 7 130
|
||||
10 11 701
|
||||
10 15 287
|
||||
10 17 19
|
||||
10 20 240
|
||||
10 22 599
|
||||
10 27 107
|
||||
10 30 826
|
||||
10 31 820
|
||||
10 32 277
|
||||
10 33 974
|
||||
10 34 789
|
||||
11 10 626
|
||||
11 17 30
|
||||
11 21 337
|
||||
11 25 724
|
||||
11 29 54
|
||||
11 31 678
|
||||
11 33 855
|
||||
12 2 100
|
||||
12 7 623
|
||||
12 14 576
|
||||
12 18 446
|
||||
12 24 84
|
||||
12 26 270
|
||||
12 28 835
|
||||
12 29 718
|
||||
13 5 436
|
||||
13 7 338
|
||||
13 14 766
|
||||
13 22 220
|
||||
13 23 961
|
||||
13 24 891
|
||||
13 28 436
|
||||
13 30 116
|
||||
14 4 259
|
||||
14 12 222
|
||||
14 13 841
|
||||
14 16 864
|
||||
14 25 248
|
||||
14 26 649
|
||||
14 30 73
|
||||
15 3 105
|
||||
15 6 267
|
||||
15 8 266
|
||||
15 29 998
|
||||
16 0 899
|
||||
16 1 878
|
||||
16 9 955
|
||||
16 11 122
|
||||
16 18 198
|
||||
16 21 234
|
||||
16 22 30
|
||||
16 27 565
|
||||
16 28 173
|
||||
17 3 128
|
||||
17 7 627
|
||||
17 8 799
|
||||
17 12 28
|
||||
17 14 807
|
||||
17 27 571
|
||||
17 29 352
|
||||
17 30 692
|
||||
18 1 488
|
||||
18 10 917
|
||||
18 12 389
|
||||
18 15 565
|
||||
18 17 841
|
||||
18 21 968
|
||||
18 22 899
|
||||
18 24 396
|
||||
19 2 326
|
||||
19 3 294
|
||||
19 6 763
|
||||
19 8 526
|
||||
19 11 314
|
||||
19 13 849
|
||||
19 17 459
|
||||
19 24 938
|
||||
19 25 229
|
||||
19 31 173
|
||||
19 34 476
|
||||
20 27 501
|
||||
20 29 872
|
||||
20 34 396
|
||||
21 0 507
|
||||
21 10 523
|
||||
21 11 264
|
||||
21 17 348
|
||||
21 19 203
|
||||
21 22 536
|
||||
21 24 299
|
||||
21 27 785
|
||||
21 28 131
|
||||
21 32 302
|
||||
21 33 403
|
||||
22 5 916
|
||||
22 7 791
|
||||
22 13 90
|
||||
22 20 869
|
||||
22 26 704
|
||||
22 29 372
|
||||
23 0 29
|
||||
23 7 254
|
||||
23 15 773
|
||||
23 22 908
|
||||
23 31 871
|
||||
24 9 861
|
||||
24 12 523
|
||||
24 30 229
|
||||
24 31 743
|
||||
24 32 842
|
||||
24 33 544
|
||||
25 1 206
|
||||
25 8 209
|
||||
25 15 693
|
||||
25 31 816
|
||||
25 33 638
|
||||
26 18 363
|
||||
26 27 473
|
||||
26 32 839
|
||||
26 34 521
|
||||
27 0 910
|
||||
27 3 692
|
||||
27 6 92
|
||||
27 8 225
|
||||
27 17 203
|
||||
27 20 735
|
||||
27 25 114
|
||||
27 28 208
|
||||
27 31 247
|
||||
28 0 877
|
||||
28 1 906
|
||||
28 6 858
|
||||
28 10 412
|
||||
28 11 790
|
||||
28 20 313
|
||||
28 22 403
|
||||
28 26 86
|
||||
28 34 754
|
||||
29 5 976
|
||||
29 10 898
|
||||
29 15 744
|
||||
29 16 925
|
||||
29 17 224
|
||||
29 34 465
|
||||
30 4 608
|
||||
30 5 303
|
||||
30 6 366
|
||||
30 8 386
|
||||
30 13 692
|
||||
30 17 504
|
||||
30 22 165
|
||||
30 23 292
|
||||
30 24 247
|
||||
30 31 367
|
||||
30 33 432
|
||||
30 34 635
|
||||
31 8 23
|
||||
31 11 511
|
||||
31 12 857
|
||||
31 16 744
|
||||
31 28 663
|
||||
32 5 380
|
||||
32 10 356
|
||||
32 11 241
|
||||
32 15 587
|
||||
32 19 393
|
||||
32 21 986
|
||||
33 2 391
|
||||
33 6 747
|
||||
33 19 910
|
||||
33 27 903
|
||||
34 3 694
|
||||
34 7 227
|
||||
34 9 87
|
||||
34 12 788
|
||||
34 15 755
|
||||
34 26 585
|
||||
0 0
|
||||
1347
quase-menor-caminho/input/11
Normal file
1347
quase-menor-caminho/input/11
Normal file
File diff suppressed because it is too large
Load Diff
339
quase-menor-caminho/input/12
Normal file
339
quase-menor-caminho/input/12
Normal file
@@ -0,0 +1,339 @@
|
||||
35 327
|
||||
0 34
|
||||
6 16 291
|
||||
34 22 981
|
||||
28 23 410
|
||||
25 19 54
|
||||
14 4 10
|
||||
16 15 810
|
||||
17 32 523
|
||||
12 7 254
|
||||
13 14 97
|
||||
8 14 116
|
||||
0 11 825
|
||||
30 18 599
|
||||
20 33 952
|
||||
27 18 571
|
||||
1 6 325
|
||||
9 13 4
|
||||
23 22 768
|
||||
0 8 769
|
||||
33 18 857
|
||||
2 6 308
|
||||
14 6 893
|
||||
7 3 844
|
||||
32 33 261
|
||||
31 29 83
|
||||
6 0 192
|
||||
7 9 34
|
||||
3 12 908
|
||||
28 29 561
|
||||
16 0 949
|
||||
5 4 782
|
||||
3 4 291
|
||||
4 1 754
|
||||
26 22 425
|
||||
12 8 694
|
||||
25 23 116
|
||||
8 1 470
|
||||
18 24 373
|
||||
20 23 460
|
||||
5 3 81
|
||||
4 16 797
|
||||
31 22 187
|
||||
30 32 672
|
||||
9 7 796
|
||||
19 31 17
|
||||
10 4 665
|
||||
19 20 883
|
||||
25 29 302
|
||||
9 15 53
|
||||
33 32 217
|
||||
2 10 298
|
||||
14 0 667
|
||||
26 23 374
|
||||
26 24 884
|
||||
13 9 120
|
||||
31 30 522
|
||||
8 9 222
|
||||
25 34 344
|
||||
12 10 401
|
||||
30 20 262
|
||||
33 23 372
|
||||
1 5 992
|
||||
25 32 120
|
||||
31 18 159
|
||||
21 29 759
|
||||
1 11 472
|
||||
30 22 976
|
||||
29 28 886
|
||||
11 2 867
|
||||
32 28 541
|
||||
28 26 200
|
||||
12 16 815
|
||||
3 15 431
|
||||
10 16 555
|
||||
32 24 221
|
||||
26 32 700
|
||||
21 19 221
|
||||
15 11 270
|
||||
0 3 107
|
||||
12 11 292
|
||||
9 4 568
|
||||
29 26 365
|
||||
14 3 312
|
||||
9 12 571
|
||||
14 16 890
|
||||
24 30 588
|
||||
19 32 769
|
||||
6 2 479
|
||||
29 33 213
|
||||
7 4 275
|
||||
21 25 965
|
||||
23 24 442
|
||||
12 0 448
|
||||
18 19 433
|
||||
1 3 286
|
||||
5 9 744
|
||||
26 30 188
|
||||
9 14 980
|
||||
17 27 898
|
||||
9 8 497
|
||||
1 13 120
|
||||
28 31 477
|
||||
17 28 199
|
||||
7 10 173
|
||||
9 0 371
|
||||
20 31 371
|
||||
29 20 955
|
||||
15 3 619
|
||||
34 24 643
|
||||
22 30 968
|
||||
6 15 544
|
||||
30 26 40
|
||||
16 3 433
|
||||
10 5 859
|
||||
10 7 291
|
||||
34 17 761
|
||||
1 16 12
|
||||
12 14 116
|
||||
10 12 710
|
||||
3 5 691
|
||||
34 26 613
|
||||
0 16 865
|
||||
33 34 258
|
||||
4 2 146
|
||||
14 5 528
|
||||
19 25 775
|
||||
21 26 27
|
||||
23 31 376
|
||||
26 17 185
|
||||
17 25 695
|
||||
9 1 105
|
||||
5 14 229
|
||||
15 5 724
|
||||
24 23 499
|
||||
30 31 625
|
||||
18 25 757
|
||||
29 22 116
|
||||
22 28 733
|
||||
22 23 608
|
||||
30 17 786
|
||||
28 32 896
|
||||
13 15 361
|
||||
14 10 56
|
||||
9 2 187
|
||||
4 10 586
|
||||
20 17 454
|
||||
20 32 995
|
||||
30 28 579
|
||||
7 0 785
|
||||
15 13 65
|
||||
13 2 844
|
||||
20 29 850
|
||||
15 14 158
|
||||
13 6 367
|
||||
33 27 830
|
||||
8 7 533
|
||||
5 0 597
|
||||
1 12 618
|
||||
24 19 229
|
||||
13 7 15
|
||||
2 13 802
|
||||
12 13 75
|
||||
8 16 315
|
||||
23 20 252
|
||||
27 34 593
|
||||
5 8 950
|
||||
18 30 196
|
||||
6 12 972
|
||||
34 27 809
|
||||
22 27 271
|
||||
18 31 737
|
||||
9 3 504
|
||||
1 0 697
|
||||
20 26 513
|
||||
26 18 801
|
||||
4 0 637
|
||||
12 9 171
|
||||
7 8 402
|
||||
10 0 784
|
||||
12 5 991
|
||||
29 18 644
|
||||
32 19 467
|
||||
34 21 102
|
||||
5 15 43
|
||||
12 6 260
|
||||
1 10 8
|
||||
11 6 919
|
||||
25 31 627
|
||||
24 27 432
|
||||
29 23 449
|
||||
31 21 821
|
||||
10 3 800
|
||||
22 34 375
|
||||
17 34 65
|
||||
26 25 140
|
||||
4 11 312
|
||||
21 23 149
|
||||
23 33 162
|
||||
32 21 268
|
||||
1 4 428
|
||||
33 30 684
|
||||
28 34 651
|
||||
31 24 827
|
||||
27 17 925
|
||||
14 15 706
|
||||
17 26 968
|
||||
3 13 828
|
||||
22 18 240
|
||||
11 3 474
|
||||
13 16 666
|
||||
15 0 614
|
||||
11 13 546
|
||||
12 3 268
|
||||
11 4 911
|
||||
16 2 609
|
||||
1 8 688
|
||||
25 17 475
|
||||
17 19 384
|
||||
34 19 864
|
||||
3 14 450
|
||||
22 20 563
|
||||
28 24 634
|
||||
26 29 797
|
||||
5 16 586
|
||||
23 17 885
|
||||
15 2 461
|
||||
2 1 714
|
||||
2 3 453
|
||||
31 23 700
|
||||
0 2 639
|
||||
22 24 873
|
||||
16 10 486
|
||||
1 2 306
|
||||
16 4 117
|
||||
20 34 40
|
||||
14 13 829
|
||||
15 10 276
|
||||
7 12 454
|
||||
0 1 504
|
||||
18 32 630
|
||||
10 14 748
|
||||
30 34 964
|
||||
19 24 193
|
||||
5 2 296
|
||||
17 20 391
|
||||
16 14 790
|
||||
25 27 930
|
||||
21 34 69
|
||||
3 8 659
|
||||
32 17 123
|
||||
30 25 929
|
||||
10 1 720
|
||||
27 33 619
|
||||
29 31 798
|
||||
20 18 785
|
||||
15 1 105
|
||||
3 10 208
|
||||
18 34 192
|
||||
16 13 759
|
||||
23 30 423
|
||||
25 33 239
|
||||
8 0 444
|
||||
29 27 40
|
||||
2 8 723
|
||||
20 25 771
|
||||
10 2 139
|
||||
19 30 188
|
||||
8 6 885
|
||||
1 9 719
|
||||
15 4 656
|
||||
24 17 780
|
||||
7 11 625
|
||||
0 4 355
|
||||
16 7 988
|
||||
4 9 948
|
||||
18 33 539
|
||||
6 4 205
|
||||
28 20 423
|
||||
13 5 855
|
||||
22 32 223
|
||||
26 33 612
|
||||
18 20 662
|
||||
17 24 73
|
||||
18 22 236
|
||||
5 7 681
|
||||
19 27 43
|
||||
24 31 165
|
||||
7 6 422
|
||||
2 12 526
|
||||
26 28 657
|
||||
24 22 507
|
||||
15 9 164
|
||||
27 26 189
|
||||
7 5 241
|
||||
6 1 768
|
||||
21 18 844
|
||||
21 20 4
|
||||
0 15 610
|
||||
27 30 393
|
||||
0 7 311
|
||||
12 15 494
|
||||
6 13 384
|
||||
23 34 93
|
||||
14 7 410
|
||||
14 9 391
|
||||
13 12 509
|
||||
5 1 856
|
||||
24 18 842
|
||||
25 24 956
|
||||
22 29 988
|
||||
33 28 830
|
||||
5 10 793
|
||||
29 24 420
|
||||
21 32 496
|
||||
3 16 471
|
||||
24 25 506
|
||||
34 25 483
|
||||
27 28 469
|
||||
22 31 176
|
||||
11 12 818
|
||||
10 15 905
|
||||
4 15 689
|
||||
3 1 273
|
||||
31 32 273
|
||||
11 10 437
|
||||
32 31 720
|
||||
7 2 363
|
||||
23 32 368
|
||||
5 7
|
||||
0 4
|
||||
0 1 1
|
||||
1 2 1
|
||||
2 3 1
|
||||
3 4 1
|
||||
0 4 8
|
||||
0 2 3
|
||||
2 4 5
|
||||
0 0
|
||||
1103
quase-menor-caminho/input/13
Normal file
1103
quase-menor-caminho/input/13
Normal file
File diff suppressed because it is too large
Load Diff
613
quase-menor-caminho/input/14
Normal file
613
quase-menor-caminho/input/14
Normal file
@@ -0,0 +1,613 @@
|
||||
4 5
|
||||
0 3
|
||||
0 1 1
|
||||
1 2 1
|
||||
2 3 1
|
||||
0 3 7
|
||||
0 2 3
|
||||
11 13
|
||||
0 10
|
||||
0 1 1
|
||||
1 2 1
|
||||
2 3 1
|
||||
3 4 1
|
||||
4 5 1
|
||||
5 6 1
|
||||
6 7 1
|
||||
7 8 1
|
||||
8 9 1
|
||||
9 10 1
|
||||
0 10 14
|
||||
0 2 3
|
||||
2 10 11
|
||||
36 38
|
||||
0 35
|
||||
0 1 1
|
||||
1 2 1
|
||||
2 3 1
|
||||
3 4 1
|
||||
4 5 1
|
||||
5 6 1
|
||||
6 7 1
|
||||
7 8 1
|
||||
8 9 1
|
||||
9 10 1
|
||||
10 11 1
|
||||
11 12 1
|
||||
12 13 1
|
||||
13 14 1
|
||||
14 15 1
|
||||
15 16 1
|
||||
16 17 1
|
||||
17 18 1
|
||||
18 19 1
|
||||
19 20 1
|
||||
20 21 1
|
||||
21 22 1
|
||||
22 23 1
|
||||
23 24 1
|
||||
24 25 1
|
||||
25 26 1
|
||||
26 27 1
|
||||
27 28 1
|
||||
28 29 1
|
||||
29 30 1
|
||||
30 31 1
|
||||
31 32 1
|
||||
32 33 1
|
||||
33 34 1
|
||||
34 35 1
|
||||
0 35 39
|
||||
0 2 3
|
||||
2 35 36
|
||||
12 41
|
||||
0 11
|
||||
9 8 410
|
||||
3 1 777
|
||||
8 9 20
|
||||
1 5 23
|
||||
2 1 153
|
||||
8 6 793
|
||||
0 1 798
|
||||
11 6 625
|
||||
0 4 184
|
||||
5 3 143
|
||||
10 7 66
|
||||
9 10 383
|
||||
11 7 90
|
||||
10 8 217
|
||||
0 3 598
|
||||
7 6 626
|
||||
3 4 593
|
||||
9 6 82
|
||||
7 8 577
|
||||
6 11 469
|
||||
5 1 251
|
||||
7 11 800
|
||||
2 4 67
|
||||
0 5 177
|
||||
4 2 479
|
||||
4 3 896
|
||||
2 0 552
|
||||
8 10 526
|
||||
2 5 901
|
||||
9 11 708
|
||||
1 2 269
|
||||
7 9 936
|
||||
11 8 692
|
||||
10 9 170
|
||||
0 2 39
|
||||
7 10 871
|
||||
5 0 21
|
||||
11 9 590
|
||||
11 10 626
|
||||
4 1 507
|
||||
6 9 450
|
||||
39 505
|
||||
0 38
|
||||
1 12 746
|
||||
1 3 283
|
||||
14 4 223
|
||||
23 22 560
|
||||
9 13 115
|
||||
9 1 602
|
||||
22 21 711
|
||||
2 17 755
|
||||
35 33 717
|
||||
4 15 685
|
||||
37 21 579
|
||||
6 9 764
|
||||
36 26 851
|
||||
18 3 948
|
||||
2 15 60
|
||||
11 13 295
|
||||
19 28 436
|
||||
1 0 920
|
||||
1 8 362
|
||||
13 6 917
|
||||
37 34 348
|
||||
35 21 731
|
||||
9 5 253
|
||||
34 30 773
|
||||
26 28 254
|
||||
17 5 947
|
||||
9 12 574
|
||||
38 19 414
|
||||
5 14 156
|
||||
18 8 340
|
||||
28 24 637
|
||||
35 34 634
|
||||
32 37 889
|
||||
6 4 927
|
||||
12 6 405
|
||||
0 4 218
|
||||
16 8 950
|
||||
21 23 482
|
||||
21 27 208
|
||||
18 1 654
|
||||
8 13 958
|
||||
16 1 808
|
||||
30 38 550
|
||||
36 31 721
|
||||
15 10 149
|
||||
3 17 94
|
||||
17 9 404
|
||||
6 13 981
|
||||
31 35 922
|
||||
13 0 789
|
||||
19 21 19
|
||||
37 29 773
|
||||
38 26 582
|
||||
36 28 37
|
||||
8 4 512
|
||||
32 26 22
|
||||
12 16 359
|
||||
34 23 582
|
||||
15 8 199
|
||||
18 13 765
|
||||
14 2 398
|
||||
11 4 772
|
||||
33 31 421
|
||||
4 13 643
|
||||
23 19 948
|
||||
6 12 684
|
||||
10 7 987
|
||||
11 0 11
|
||||
38 28 362
|
||||
25 37 672
|
||||
11 14 485
|
||||
12 11 978
|
||||
29 21 108
|
||||
6 5 972
|
||||
7 10 156
|
||||
17 7 82
|
||||
29 38 355
|
||||
8 2 94
|
||||
15 14 338
|
||||
3 11 216
|
||||
33 24 356
|
||||
28 19 793
|
||||
5 6 720
|
||||
18 2 420
|
||||
21 20 921
|
||||
1 18 417
|
||||
28 25 54
|
||||
27 35 910
|
||||
7 15 594
|
||||
36 38 9
|
||||
12 2 590
|
||||
19 30 626
|
||||
6 1 453
|
||||
38 20 262
|
||||
14 12 243
|
||||
14 1 214
|
||||
14 8 929
|
||||
26 25 538
|
||||
35 23 804
|
||||
9 14 999
|
||||
24 32 369
|
||||
14 11 897
|
||||
20 32 813
|
||||
20 31 752
|
||||
38 31 43
|
||||
15 18 488
|
||||
25 23 409
|
||||
25 38 45
|
||||
24 35 95
|
||||
11 8 86
|
||||
17 4 597
|
||||
30 26 366
|
||||
31 25 378
|
||||
3 0 935
|
||||
0 17 242
|
||||
30 27 91
|
||||
6 8 16
|
||||
6 3 656
|
||||
35 25 466
|
||||
26 29 662
|
||||
8 18 596
|
||||
36 24 32
|
||||
15 1 111
|
||||
13 12 989
|
||||
10 15 589
|
||||
13 16 928
|
||||
28 37 764
|
||||
18 16 144
|
||||
4 10 779
|
||||
22 23 223
|
||||
6 0 74
|
||||
24 27 523
|
||||
30 37 971
|
||||
27 23 163
|
||||
31 33 284
|
||||
19 37 27
|
||||
14 6 670
|
||||
7 9 813
|
||||
16 7 626
|
||||
14 0 729
|
||||
37 24 151
|
||||
1 17 280
|
||||
25 24 889
|
||||
21 33 300
|
||||
19 33 161
|
||||
19 32 889
|
||||
13 2 3
|
||||
21 31 715
|
||||
33 38 786
|
||||
38 23 696
|
||||
25 35 629
|
||||
18 12 836
|
||||
2 13 821
|
||||
34 38 343
|
||||
14 18 604
|
||||
36 20 901
|
||||
5 15 905
|
||||
4 3 919
|
||||
5 10 606
|
||||
3 12 170
|
||||
20 25 425
|
||||
18 7 639
|
||||
26 33 590
|
||||
16 0 654
|
||||
10 3 550
|
||||
9 16 578
|
||||
26 20 327
|
||||
8 11 818
|
||||
7 1 699
|
||||
23 35 913
|
||||
33 23 716
|
||||
32 19 431
|
||||
34 19 215
|
||||
24 23 139
|
||||
38 27 135
|
||||
38 32 36
|
||||
35 22 832
|
||||
12 7 386
|
||||
32 36 79
|
||||
9 2 886
|
||||
30 29 189
|
||||
17 12 863
|
||||
38 24 181
|
||||
14 16 123
|
||||
11 18 75
|
||||
14 15 492
|
||||
30 36 22
|
||||
29 31 431
|
||||
23 32 147
|
||||
19 38 202
|
||||
35 26 19
|
||||
15 17 244
|
||||
21 22 553
|
||||
10 18 358
|
||||
18 17 258
|
||||
6 7 175
|
||||
22 35 174
|
||||
23 21 58
|
||||
9 4 59
|
||||
22 27 830
|
||||
1 6 490
|
||||
31 26 654
|
||||
16 6 967
|
||||
14 13 796
|
||||
24 34 492
|
||||
1 7 251
|
||||
8 14 630
|
||||
14 5 538
|
||||
33 30 683
|
||||
7 8 986
|
||||
10 8 310
|
||||
33 29 600
|
||||
18 14 299
|
||||
2 14 382
|
||||
13 18 999
|
||||
19 31 391
|
||||
32 21 752
|
||||
4 5 64
|
||||
31 30 664
|
||||
28 29 634
|
||||
22 37 394
|
||||
11 10 62
|
||||
17 6 390
|
||||
13 17 15
|
||||
37 36 279
|
||||
34 24 281
|
||||
30 31 164
|
||||
0 18 379
|
||||
24 20 54
|
||||
17 3 633
|
||||
26 34 848
|
||||
17 13 889
|
||||
5 11 727
|
||||
8 17 415
|
||||
34 31 617
|
||||
28 31 294
|
||||
11 7 412
|
||||
15 6 248
|
||||
15 12 270
|
||||
16 15 895
|
||||
32 35 896
|
||||
29 37 578
|
||||
8 10 634
|
||||
29 23 859
|
||||
7 12 811
|
||||
17 1 114
|
||||
11 1 615
|
||||
26 31 319
|
||||
0 16 630
|
||||
20 37 280
|
||||
1 5 5
|
||||
7 14 541
|
||||
2 7 404
|
||||
4 1 624
|
||||
16 10 164
|
||||
38 22 73
|
||||
5 7 341
|
||||
12 18 119
|
||||
8 6 997
|
||||
33 22 577
|
||||
6 18 308
|
||||
18 4 746
|
||||
20 38 158
|
||||
31 22 356
|
||||
14 7 121
|
||||
17 2 301
|
||||
5 1 809
|
||||
35 29 844
|
||||
31 24 807
|
||||
27 20 173
|
||||
34 32 860
|
||||
36 34 439
|
||||
14 9 658
|
||||
30 23 829
|
||||
7 6 811
|
||||
23 31 36
|
||||
0 12 694
|
||||
36 21 798
|
||||
37 25 343
|
||||
28 33 247
|
||||
3 1 887
|
||||
20 26 970
|
||||
4 16 781
|
||||
24 37 891
|
||||
26 19 355
|
||||
7 17 884
|
||||
31 21 692
|
||||
31 29 488
|
||||
34 21 732
|
||||
7 0 291
|
||||
26 37 516
|
||||
30 33 302
|
||||
13 11 925
|
||||
20 36 418
|
||||
8 3 195
|
||||
27 19 745
|
||||
31 20 575
|
||||
32 22 458
|
||||
31 19 378
|
||||
32 23 581
|
||||
9 7 470
|
||||
38 36 253
|
||||
10 1 969
|
||||
32 25 145
|
||||
36 23 193
|
||||
33 25 971
|
||||
4 14 130
|
||||
16 17 167
|
||||
18 11 228
|
||||
4 12 62
|
||||
37 31 721
|
||||
5 8 492
|
||||
27 30 438
|
||||
28 23 239
|
||||
5 12 773
|
||||
25 33 288
|
||||
5 9 26
|
||||
20 29 523
|
||||
19 26 72
|
||||
31 34 989
|
||||
25 31 38
|
||||
4 18 76
|
||||
10 2 83
|
||||
22 34 508
|
||||
29 20 940
|
||||
2 11 886
|
||||
21 25 996
|
||||
22 19 522
|
||||
32 30 547
|
||||
13 14 859
|
||||
31 36 322
|
||||
31 32 909
|
||||
21 36 754
|
||||
34 26 807
|
||||
10 0 544
|
||||
33 19 100
|
||||
38 25 212
|
||||
26 38 732
|
||||
11 17 296
|
||||
30 34 197
|
||||
27 33 972
|
||||
29 35 794
|
||||
19 34 657
|
||||
19 20 122
|
||||
15 0 328
|
||||
20 27 881
|
||||
20 23 738
|
||||
16 2 803
|
||||
23 38 4
|
||||
3 4 678
|
||||
10 5 291
|
||||
35 37 992
|
||||
6 11 616
|
||||
0 3 127
|
||||
28 26 933
|
||||
32 20 695
|
||||
32 38 69
|
||||
31 23 1000
|
||||
7 16 762
|
||||
24 38 760
|
||||
19 23 213
|
||||
30 32 687
|
||||
31 37 431
|
||||
26 24 962
|
||||
6 10 14
|
||||
0 11 842
|
||||
29 30 57
|
||||
24 25 300
|
||||
7 3 273
|
||||
17 18 307
|
||||
2 8 852
|
||||
26 27 932
|
||||
9 6 762
|
||||
21 34 445
|
||||
34 33 500
|
||||
3 5 223
|
||||
10 16 966
|
||||
24 29 954
|
||||
11 16 159
|
||||
22 33 247
|
||||
26 32 194
|
||||
14 17 716
|
||||
1 2 597
|
||||
29 34 485
|
||||
35 31 702
|
||||
20 19 269
|
||||
7 4 99
|
||||
13 15 533
|
||||
16 4 509
|
||||
35 20 95
|
||||
28 36 70
|
||||
2 9 938
|
||||
25 32 627
|
||||
10 17 820
|
||||
5 13 917
|
||||
28 22 576
|
||||
35 19 785
|
||||
28 35 56
|
||||
18 5 804
|
||||
2 10 236
|
||||
7 18 875
|
||||
33 27 772
|
||||
20 24 637
|
||||
22 38 196
|
||||
15 16 855
|
||||
8 9 354
|
||||
24 21 882
|
||||
8 5 652
|
||||
8 16 68
|
||||
3 13 439
|
||||
35 38 411
|
||||
22 26 260
|
||||
16 12 435
|
||||
37 33 274
|
||||
34 25 945
|
||||
1 11 52
|
||||
12 9 704
|
||||
18 15 131
|
||||
4 8 617
|
||||
21 32 556
|
||||
37 26 150
|
||||
20 35 527
|
||||
13 1 679
|
||||
36 32 435
|
||||
2 1 53
|
||||
23 24 65
|
||||
13 4 730
|
||||
21 35 623
|
||||
0 5 185
|
||||
12 15 242
|
||||
5 4 476
|
||||
36 37 409
|
||||
29 25 605
|
||||
27 25 305
|
||||
25 28 922
|
||||
22 29 913
|
||||
19 27 362
|
||||
22 31 823
|
||||
19 22 333
|
||||
29 33 258
|
||||
30 28 823
|
||||
21 24 706
|
||||
13 8 59
|
||||
25 30 941
|
||||
34 27 386
|
||||
0 9 36
|
||||
23 28 429
|
||||
9 17 447
|
||||
33 21 813
|
||||
35 32 809
|
||||
35 28 226
|
||||
2 0 62
|
||||
12 17 763
|
||||
33 36 147
|
||||
8 1 640
|
||||
24 30 656
|
||||
2 5 565
|
||||
3 2 488
|
||||
0 7 125
|
||||
37 38 996
|
||||
20 33 465
|
||||
30 19 686
|
||||
24 22 749
|
||||
22 24 987
|
||||
37 27 371
|
||||
36 30 83
|
||||
30 22 589
|
||||
1 16 917
|
||||
13 5 481
|
||||
12 13 129
|
||||
12 0 189
|
||||
7 11 17
|
||||
0 15 748
|
||||
0 10 344
|
||||
32 28 735
|
||||
20 28 788
|
||||
25 34 793
|
||||
5 3 729
|
||||
24 33 956
|
||||
15 5 846
|
||||
34 22 888
|
||||
15 4 543
|
||||
28 21 778
|
||||
4 7 658
|
||||
3 14 334
|
||||
10 9 113
|
||||
28 20 891
|
||||
38 29 824
|
||||
26 23 65
|
||||
10 14 653
|
||||
3 16 476
|
||||
8 12 548
|
||||
37 22 232
|
||||
19 29 739
|
||||
37 23 433
|
||||
33 34 801
|
||||
27 36 554
|
||||
37 28 550
|
||||
25 22 413
|
||||
38 30 451
|
||||
24 28 771
|
||||
36 35 330
|
||||
4 11 967
|
||||
17 10 469
|
||||
25 29 520
|
||||
0 0
|
||||
18
quase-menor-caminho/input/15
Normal file
18
quase-menor-caminho/input/15
Normal file
@@ -0,0 +1,18 @@
|
||||
8 15
|
||||
0 7
|
||||
0 2 421
|
||||
5 6 225
|
||||
7 5 104
|
||||
5 4 76
|
||||
3 0 620
|
||||
4 5 309
|
||||
5 7 408
|
||||
2 0 669
|
||||
6 7 657
|
||||
4 6 428
|
||||
2 1 479
|
||||
7 4 400
|
||||
0 3 705
|
||||
0 1 911
|
||||
1 3 626
|
||||
0 0
|
||||
98
quase-menor-caminho/input/16
Normal file
98
quase-menor-caminho/input/16
Normal file
@@ -0,0 +1,98 @@
|
||||
22 24
|
||||
0 21
|
||||
0 1 1
|
||||
1 2 1
|
||||
2 3 1
|
||||
3 4 1
|
||||
4 5 1
|
||||
5 6 1
|
||||
6 7 1
|
||||
7 8 1
|
||||
8 9 1
|
||||
9 10 1
|
||||
10 11 1
|
||||
11 12 1
|
||||
12 13 1
|
||||
13 14 1
|
||||
14 15 1
|
||||
15 16 1
|
||||
16 17 1
|
||||
17 18 1
|
||||
18 19 1
|
||||
19 20 1
|
||||
20 21 1
|
||||
0 21 25
|
||||
0 2 3
|
||||
2 21 22
|
||||
27 29
|
||||
0 26
|
||||
0 1 1
|
||||
1 2 1
|
||||
2 3 1
|
||||
3 4 1
|
||||
4 5 1
|
||||
5 6 1
|
||||
6 7 1
|
||||
7 8 1
|
||||
8 9 1
|
||||
9 10 1
|
||||
10 11 1
|
||||
11 12 1
|
||||
12 13 1
|
||||
13 14 1
|
||||
14 15 1
|
||||
15 16 1
|
||||
16 17 1
|
||||
17 18 1
|
||||
18 19 1
|
||||
19 20 1
|
||||
20 21 1
|
||||
21 22 1
|
||||
22 23 1
|
||||
23 24 1
|
||||
24 25 1
|
||||
25 26 1
|
||||
0 26 30
|
||||
0 2 3
|
||||
2 26 27
|
||||
8 38
|
||||
0 7
|
||||
0 1 1
|
||||
0 2 1
|
||||
1 5 2
|
||||
2 5 2
|
||||
5 7 2
|
||||
0 7 8
|
||||
0 5 6
|
||||
1 7 7
|
||||
0 4 368
|
||||
0 6 949
|
||||
1 2 864
|
||||
1 3 873
|
||||
1 6 67
|
||||
2 0 112
|
||||
2 1 382
|
||||
2 3 533
|
||||
2 6 572
|
||||
3 1 555
|
||||
3 2 578
|
||||
3 4 378
|
||||
3 6 272
|
||||
3 7 361
|
||||
4 0 39
|
||||
4 1 528
|
||||
4 2 995
|
||||
4 3 472
|
||||
4 5 592
|
||||
4 6 857
|
||||
5 1 760
|
||||
5 3 518
|
||||
5 6 518
|
||||
6 0 901
|
||||
6 1 642
|
||||
6 5 651
|
||||
7 1 472
|
||||
7 2 946
|
||||
7 4 213
|
||||
7 6 559
|
||||
0 0
|
||||
1068
quase-menor-caminho/input/17
Normal file
1068
quase-menor-caminho/input/17
Normal file
File diff suppressed because it is too large
Load Diff
3773
quase-menor-caminho/input/18
Normal file
3773
quase-menor-caminho/input/18
Normal file
File diff suppressed because it is too large
Load Diff
1762
quase-menor-caminho/input/19
Normal file
1762
quase-menor-caminho/input/19
Normal file
File diff suppressed because it is too large
Load Diff
15
quase-menor-caminho/input/2
Normal file
15
quase-menor-caminho/input/2
Normal file
@@ -0,0 +1,15 @@
|
||||
2 1
|
||||
0 1
|
||||
0 1 7
|
||||
3 3
|
||||
0 2
|
||||
0 1 1
|
||||
1 2 1
|
||||
0 2 3
|
||||
4 4
|
||||
0 3
|
||||
0 1 1
|
||||
1 3 1
|
||||
0 2 1
|
||||
2 3 1
|
||||
0 0
|
||||
4698
quase-menor-caminho/input/20
Normal file
4698
quase-menor-caminho/input/20
Normal file
File diff suppressed because it is too large
Load Diff
4824
quase-menor-caminho/input/21
Normal file
4824
quase-menor-caminho/input/21
Normal file
File diff suppressed because it is too large
Load Diff
4699
quase-menor-caminho/input/22
Normal file
4699
quase-menor-caminho/input/22
Normal file
File diff suppressed because it is too large
Load Diff
83
quase-menor-caminho/input/23
Normal file
83
quase-menor-caminho/input/23
Normal file
@@ -0,0 +1,83 @@
|
||||
10 12
|
||||
0 9
|
||||
0 1 1
|
||||
1 2 1
|
||||
2 3 1
|
||||
3 4 1
|
||||
4 5 1
|
||||
5 6 1
|
||||
6 7 1
|
||||
7 8 1
|
||||
8 9 1
|
||||
0 9 13
|
||||
0 2 3
|
||||
2 9 10
|
||||
64 66
|
||||
0 63
|
||||
0 1 1
|
||||
1 2 1
|
||||
2 3 1
|
||||
3 4 1
|
||||
4 5 1
|
||||
5 6 1
|
||||
6 7 1
|
||||
7 8 1
|
||||
8 9 1
|
||||
9 10 1
|
||||
10 11 1
|
||||
11 12 1
|
||||
12 13 1
|
||||
13 14 1
|
||||
14 15 1
|
||||
15 16 1
|
||||
16 17 1
|
||||
17 18 1
|
||||
18 19 1
|
||||
19 20 1
|
||||
20 21 1
|
||||
21 22 1
|
||||
22 23 1
|
||||
23 24 1
|
||||
24 25 1
|
||||
25 26 1
|
||||
26 27 1
|
||||
27 28 1
|
||||
28 29 1
|
||||
29 30 1
|
||||
30 31 1
|
||||
31 32 1
|
||||
32 33 1
|
||||
33 34 1
|
||||
34 35 1
|
||||
35 36 1
|
||||
36 37 1
|
||||
37 38 1
|
||||
38 39 1
|
||||
39 40 1
|
||||
40 41 1
|
||||
41 42 1
|
||||
42 43 1
|
||||
43 44 1
|
||||
44 45 1
|
||||
45 46 1
|
||||
46 47 1
|
||||
47 48 1
|
||||
48 49 1
|
||||
49 50 1
|
||||
50 51 1
|
||||
51 52 1
|
||||
52 53 1
|
||||
53 54 1
|
||||
54 55 1
|
||||
55 56 1
|
||||
56 57 1
|
||||
57 58 1
|
||||
58 59 1
|
||||
59 60 1
|
||||
60 61 1
|
||||
61 62 1
|
||||
62 63 1
|
||||
0 63 67
|
||||
0 2 3
|
||||
2 63 64
|
||||
0 0
|
||||
9
quase-menor-caminho/input/24
Normal file
9
quase-menor-caminho/input/24
Normal file
@@ -0,0 +1,9 @@
|
||||
6 6
|
||||
0 5
|
||||
4 3 973
|
||||
1 0 873
|
||||
5 3 410
|
||||
0 2 196
|
||||
2 1 361
|
||||
3 5 761
|
||||
0 0
|
||||
414
quase-menor-caminho/input/25
Normal file
414
quase-menor-caminho/input/25
Normal file
@@ -0,0 +1,414 @@
|
||||
42 408
|
||||
3 12
|
||||
3 28 10
|
||||
28 37 7
|
||||
37 24 15
|
||||
24 12 19
|
||||
0 3 721
|
||||
0 8 550
|
||||
0 10 585
|
||||
0 13 109
|
||||
0 20 771
|
||||
0 23 370
|
||||
0 28 658
|
||||
0 29 730
|
||||
0 37 319
|
||||
0 39 780
|
||||
0 41 522
|
||||
1 0 133
|
||||
1 5 290
|
||||
1 6 834
|
||||
1 8 201
|
||||
1 13 184
|
||||
1 22 939
|
||||
1 23 816
|
||||
1 28 437
|
||||
1 30 911
|
||||
1 34 646
|
||||
1 35 320
|
||||
1 38 77
|
||||
1 41 354
|
||||
2 4 814
|
||||
2 14 988
|
||||
2 26 588
|
||||
2 31 385
|
||||
2 33 215
|
||||
3 1 900
|
||||
3 8 29
|
||||
3 9 677
|
||||
3 10 923
|
||||
3 11 81
|
||||
3 13 537
|
||||
3 14 362
|
||||
3 20 863
|
||||
3 22 140
|
||||
3 26 973
|
||||
3 29 120
|
||||
3 32 678
|
||||
3 34 7
|
||||
3 38 486
|
||||
4 1 251
|
||||
4 2 808
|
||||
4 9 847
|
||||
4 17 122
|
||||
4 21 434
|
||||
4 30 721
|
||||
4 32 282
|
||||
4 35 852
|
||||
5 11 505
|
||||
5 17 183
|
||||
5 24 224
|
||||
5 36 546
|
||||
5 40 322
|
||||
6 0 465
|
||||
6 2 230
|
||||
6 14 767
|
||||
6 19 623
|
||||
6 26 13
|
||||
6 37 101
|
||||
6 39 640
|
||||
7 0 860
|
||||
7 9 739
|
||||
7 10 65
|
||||
7 11 680
|
||||
7 14 968
|
||||
7 15 117
|
||||
7 16 882
|
||||
7 17 1
|
||||
7 18 670
|
||||
7 20 193
|
||||
7 27 327
|
||||
7 30 233
|
||||
7 35 118
|
||||
7 38 948
|
||||
7 39 167
|
||||
8 7 732
|
||||
8 9 333
|
||||
8 11 629
|
||||
8 14 643
|
||||
8 19 558
|
||||
8 20 918
|
||||
8 21 398
|
||||
8 24 89
|
||||
8 26 252
|
||||
8 28 606
|
||||
8 29 193
|
||||
8 30 964
|
||||
8 32 652
|
||||
8 40 338
|
||||
9 0 431
|
||||
9 5 884
|
||||
9 15 715
|
||||
9 16 777
|
||||
9 17 492
|
||||
9 18 75
|
||||
9 19 467
|
||||
9 23 786
|
||||
9 31 123
|
||||
9 40 619
|
||||
9 41 549
|
||||
10 3 561
|
||||
10 9 149
|
||||
10 11 969
|
||||
10 13 5
|
||||
10 14 429
|
||||
10 15 20
|
||||
10 16 897
|
||||
10 18 351
|
||||
10 22 474
|
||||
10 26 168
|
||||
10 27 932
|
||||
10 35 178
|
||||
10 36 161
|
||||
10 39 670
|
||||
11 1 148
|
||||
11 6 355
|
||||
11 7 764
|
||||
11 8 629
|
||||
11 12 516
|
||||
11 14 280
|
||||
11 15 211
|
||||
11 21 253
|
||||
11 32 469
|
||||
12 1 266
|
||||
12 5 105
|
||||
12 17 536
|
||||
12 19 218
|
||||
12 21 429
|
||||
12 24 897
|
||||
12 38 980
|
||||
12 39 85
|
||||
13 10 984
|
||||
13 12 293
|
||||
13 23 644
|
||||
13 25 578
|
||||
13 28 890
|
||||
13 32 746
|
||||
13 36 893
|
||||
13 41 410
|
||||
14 0 225
|
||||
14 1 570
|
||||
14 3 17
|
||||
14 7 570
|
||||
14 13 524
|
||||
14 16 163
|
||||
14 17 980
|
||||
14 20 999
|
||||
14 24 674
|
||||
14 31 781
|
||||
14 38 460
|
||||
14 41 959
|
||||
15 2 927
|
||||
15 12 706
|
||||
15 13 610
|
||||
15 14 257
|
||||
15 18 321
|
||||
15 24 763
|
||||
15 25 458
|
||||
15 27 403
|
||||
15 28 293
|
||||
15 29 781
|
||||
15 30 416
|
||||
16 5 618
|
||||
16 8 986
|
||||
16 9 277
|
||||
16 11 284
|
||||
16 22 653
|
||||
16 25 24
|
||||
16 30 930
|
||||
16 34 907
|
||||
16 37 763
|
||||
17 2 183
|
||||
17 6 371
|
||||
17 7 898
|
||||
17 21 64
|
||||
17 23 120
|
||||
17 26 809
|
||||
17 27 61
|
||||
17 30 466
|
||||
17 36 576
|
||||
17 41 858
|
||||
18 12 315
|
||||
18 21 763
|
||||
18 23 131
|
||||
18 28 502
|
||||
19 6 567
|
||||
19 28 396
|
||||
19 30 779
|
||||
19 35 856
|
||||
20 0 482
|
||||
20 6 847
|
||||
20 10 352
|
||||
20 18 545
|
||||
20 24 391
|
||||
20 34 873
|
||||
20 39 573
|
||||
20 40 620
|
||||
20 41 85
|
||||
21 0 129
|
||||
21 2 51
|
||||
21 5 313
|
||||
21 6 24
|
||||
21 17 996
|
||||
21 18 198
|
||||
21 19 578
|
||||
21 22 653
|
||||
21 31 969
|
||||
22 8 477
|
||||
22 9 579
|
||||
22 12 165
|
||||
22 13 597
|
||||
22 17 232
|
||||
22 20 607
|
||||
22 21 74
|
||||
22 23 948
|
||||
22 24 425
|
||||
22 36 125
|
||||
23 2 30
|
||||
23 4 640
|
||||
23 9 248
|
||||
23 15 227
|
||||
23 17 480
|
||||
23 18 698
|
||||
23 36 266
|
||||
23 37 69
|
||||
24 3 308
|
||||
24 9 91
|
||||
24 11 129
|
||||
24 13 854
|
||||
24 15 934
|
||||
24 17 373
|
||||
24 19 87
|
||||
24 29 234
|
||||
24 36 68
|
||||
24 38 684
|
||||
24 39 359
|
||||
25 1 193
|
||||
25 2 363
|
||||
25 7 116
|
||||
25 17 411
|
||||
25 23 710
|
||||
25 32 169
|
||||
25 34 366
|
||||
25 36 313
|
||||
25 39 705
|
||||
26 10 151
|
||||
26 11 505
|
||||
26 17 265
|
||||
26 21 448
|
||||
26 28 966
|
||||
26 31 589
|
||||
26 36 282
|
||||
26 38 690
|
||||
26 40 295
|
||||
26 41 388
|
||||
27 2 197
|
||||
27 3 433
|
||||
27 4 645
|
||||
27 21 271
|
||||
27 22 380
|
||||
27 23 696
|
||||
27 24 91
|
||||
27 31 229
|
||||
27 34 23
|
||||
27 38 979
|
||||
28 4 22
|
||||
28 5 639
|
||||
28 9 816
|
||||
28 11 950
|
||||
28 19 838
|
||||
28 22 221
|
||||
28 23 198
|
||||
28 29 790
|
||||
28 32 826
|
||||
28 38 767
|
||||
28 41 866
|
||||
29 3 865
|
||||
29 4 149
|
||||
29 6 447
|
||||
29 12 138
|
||||
29 20 189
|
||||
29 24 944
|
||||
29 26 193
|
||||
29 34 432
|
||||
29 35 683
|
||||
29 36 73
|
||||
30 8 413
|
||||
30 10 138
|
||||
30 19 682
|
||||
30 20 277
|
||||
30 23 196
|
||||
30 29 627
|
||||
30 37 975
|
||||
30 38 698
|
||||
31 1 174
|
||||
31 3 564
|
||||
31 4 247
|
||||
31 5 3
|
||||
31 8 725
|
||||
31 10 555
|
||||
31 14 663
|
||||
31 15 740
|
||||
31 18 983
|
||||
31 19 536
|
||||
31 20 418
|
||||
31 23 951
|
||||
31 24 568
|
||||
31 27 446
|
||||
31 36 885
|
||||
32 2 241
|
||||
32 4 334
|
||||
32 9 510
|
||||
32 13 216
|
||||
32 14 403
|
||||
32 15 250
|
||||
32 16 224
|
||||
32 20 100
|
||||
33 13 53
|
||||
33 16 246
|
||||
33 21 726
|
||||
33 22 469
|
||||
33 23 520
|
||||
33 26 206
|
||||
33 27 12
|
||||
33 31 304
|
||||
33 37 204
|
||||
34 3 43
|
||||
34 9 739
|
||||
34 11 773
|
||||
34 12 879
|
||||
34 13 879
|
||||
34 14 506
|
||||
34 20 576
|
||||
34 25 383
|
||||
34 29 791
|
||||
35 2 165
|
||||
35 6 11
|
||||
35 11 200
|
||||
35 12 8
|
||||
35 13 632
|
||||
35 15 729
|
||||
35 17 164
|
||||
35 24 380
|
||||
35 31 419
|
||||
35 33 71
|
||||
35 34 263
|
||||
35 37 84
|
||||
36 4 877
|
||||
36 5 831
|
||||
36 9 767
|
||||
36 15 799
|
||||
36 20 96
|
||||
36 27 811
|
||||
36 39 222
|
||||
36 41 173
|
||||
37 5 782
|
||||
37 10 173
|
||||
37 15 502
|
||||
37 27 557
|
||||
37 29 175
|
||||
37 31 244
|
||||
37 33 144
|
||||
37 38 476
|
||||
38 2 477
|
||||
38 3 709
|
||||
38 8 819
|
||||
38 10 57
|
||||
38 12 487
|
||||
38 19 834
|
||||
38 25 603
|
||||
38 27 923
|
||||
38 31 32
|
||||
38 34 545
|
||||
38 36 8
|
||||
38 39 395
|
||||
39 4 577
|
||||
39 5 504
|
||||
39 12 494
|
||||
39 13 485
|
||||
39 17 856
|
||||
39 24 676
|
||||
39 25 528
|
||||
39 32 253
|
||||
39 37 83
|
||||
40 7 720
|
||||
40 8 507
|
||||
40 9 716
|
||||
40 12 782
|
||||
40 18 815
|
||||
40 26 876
|
||||
40 28 593
|
||||
40 32 349
|
||||
41 4 487
|
||||
41 7 596
|
||||
41 9 926
|
||||
41 10 761
|
||||
41 16 93
|
||||
41 23 627
|
||||
41 25 93
|
||||
41 27 151
|
||||
41 30 331
|
||||
2 1
|
||||
0 1
|
||||
0 1 1
|
||||
0 0
|
||||
24
quase-menor-caminho/input/26
Normal file
24
quase-menor-caminho/input/26
Normal file
@@ -0,0 +1,24 @@
|
||||
19 21
|
||||
0 18
|
||||
0 1 1
|
||||
1 2 1
|
||||
2 3 1
|
||||
3 4 1
|
||||
4 5 1
|
||||
5 6 1
|
||||
6 7 1
|
||||
7 8 1
|
||||
8 9 1
|
||||
9 10 1
|
||||
10 11 1
|
||||
11 12 1
|
||||
12 13 1
|
||||
13 14 1
|
||||
14 15 1
|
||||
15 16 1
|
||||
16 17 1
|
||||
17 18 1
|
||||
0 18 22
|
||||
0 2 3
|
||||
2 18 19
|
||||
0 0
|
||||
3717
quase-menor-caminho/input/27
Normal file
3717
quase-menor-caminho/input/27
Normal file
File diff suppressed because it is too large
Load Diff
4377
quase-menor-caminho/input/28
Normal file
4377
quase-menor-caminho/input/28
Normal file
File diff suppressed because it is too large
Load Diff
443
quase-menor-caminho/input/29
Normal file
443
quase-menor-caminho/input/29
Normal file
@@ -0,0 +1,443 @@
|
||||
61 358
|
||||
0 60
|
||||
0 1 1
|
||||
0 20 1
|
||||
1 40 2
|
||||
20 40 2
|
||||
40 60 2
|
||||
0 60 8
|
||||
0 40 6
|
||||
1 60 7
|
||||
0 7 548
|
||||
0 23 687
|
||||
0 25 436
|
||||
0 36 112
|
||||
1 11 909
|
||||
1 14 355
|
||||
1 29 987
|
||||
1 39 635
|
||||
1 44 349
|
||||
2 0 341
|
||||
2 7 275
|
||||
2 9 852
|
||||
2 39 654
|
||||
2 42 147
|
||||
2 49 157
|
||||
2 52 709
|
||||
3 32 110
|
||||
3 36 539
|
||||
3 52 608
|
||||
3 59 856
|
||||
4 22 109
|
||||
4 29 358
|
||||
4 31 318
|
||||
4 32 895
|
||||
4 43 586
|
||||
4 60 844
|
||||
5 4 856
|
||||
5 29 360
|
||||
5 39 956
|
||||
5 42 776
|
||||
5 53 483
|
||||
6 5 879
|
||||
6 28 769
|
||||
6 36 673
|
||||
6 38 252
|
||||
6 40 12
|
||||
6 52 858
|
||||
6 58 576
|
||||
7 0 768
|
||||
7 5 404
|
||||
7 11 457
|
||||
7 19 824
|
||||
7 37 870
|
||||
8 16 423
|
||||
8 21 881
|
||||
8 40 190
|
||||
9 3 641
|
||||
9 20 937
|
||||
9 27 376
|
||||
9 31 602
|
||||
9 35 527
|
||||
9 50 789
|
||||
10 4 756
|
||||
10 8 150
|
||||
10 14 676
|
||||
10 21 465
|
||||
10 32 882
|
||||
10 37 22
|
||||
10 38 324
|
||||
10 42 607
|
||||
10 44 772
|
||||
10 57 513
|
||||
11 6 46
|
||||
11 13 922
|
||||
11 18 90
|
||||
11 19 79
|
||||
11 41 686
|
||||
11 43 364
|
||||
11 56 678
|
||||
11 57 198
|
||||
12 1 947
|
||||
12 14 9
|
||||
12 18 642
|
||||
12 32 88
|
||||
12 36 741
|
||||
12 39 707
|
||||
12 41 426
|
||||
12 55 144
|
||||
13 14 185
|
||||
13 52 882
|
||||
13 58 34
|
||||
14 6 743
|
||||
14 12 499
|
||||
14 18 639
|
||||
15 20 855
|
||||
15 25 513
|
||||
15 33 83
|
||||
15 51 962
|
||||
15 53 669
|
||||
15 56 110
|
||||
16 18 684
|
||||
16 20 328
|
||||
16 23 87
|
||||
16 35 403
|
||||
16 44 808
|
||||
16 53 599
|
||||
17 26 135
|
||||
17 30 68
|
||||
17 33 437
|
||||
17 37 266
|
||||
17 39 146
|
||||
17 56 777
|
||||
17 58 161
|
||||
17 59 908
|
||||
18 9 820
|
||||
18 19 345
|
||||
18 20 842
|
||||
18 48 294
|
||||
18 49 783
|
||||
18 52 452
|
||||
19 10 184
|
||||
19 16 911
|
||||
19 24 93
|
||||
19 25 195
|
||||
20 3 959
|
||||
20 19 786
|
||||
20 42 269
|
||||
20 47 988
|
||||
20 50 328
|
||||
21 11 947
|
||||
21 13 360
|
||||
21 22 441
|
||||
21 24 135
|
||||
21 25 707
|
||||
21 32 746
|
||||
21 34 205
|
||||
21 35 254
|
||||
21 42 69
|
||||
21 43 859
|
||||
21 55 829
|
||||
21 59 388
|
||||
22 1 962
|
||||
22 10 667
|
||||
22 18 433
|
||||
22 31 928
|
||||
22 51 713
|
||||
23 0 13
|
||||
23 2 595
|
||||
23 26 839
|
||||
23 38 467
|
||||
23 43 945
|
||||
23 44 695
|
||||
23 54 86
|
||||
23 56 96
|
||||
24 11 877
|
||||
24 13 553
|
||||
24 46 504
|
||||
24 53 257
|
||||
24 55 491
|
||||
25 11 734
|
||||
25 29 421
|
||||
26 3 257
|
||||
26 5 385
|
||||
26 16 484
|
||||
26 34 664
|
||||
26 35 292
|
||||
26 37 299
|
||||
26 38 522
|
||||
26 51 322
|
||||
27 0 890
|
||||
27 8 788
|
||||
27 11 326
|
||||
27 18 423
|
||||
27 47 153
|
||||
27 48 984
|
||||
27 53 998
|
||||
28 13 158
|
||||
28 20 254
|
||||
28 31 116
|
||||
28 34 11
|
||||
29 14 533
|
||||
29 25 926
|
||||
29 31 804
|
||||
29 37 389
|
||||
29 45 35
|
||||
29 51 35
|
||||
29 56 729
|
||||
30 0 252
|
||||
30 7 848
|
||||
30 24 672
|
||||
30 38 95
|
||||
30 48 192
|
||||
30 55 207
|
||||
31 5 626
|
||||
31 7 251
|
||||
31 19 520
|
||||
31 29 767
|
||||
31 41 278
|
||||
31 56 980
|
||||
32 5 471
|
||||
32 8 107
|
||||
32 9 116
|
||||
32 26 270
|
||||
32 31 142
|
||||
32 53 322
|
||||
32 55 303
|
||||
33 7 662
|
||||
33 42 448
|
||||
34 1 575
|
||||
34 19 108
|
||||
34 22 260
|
||||
34 26 541
|
||||
34 30 921
|
||||
34 33 565
|
||||
34 40 626
|
||||
34 58 682
|
||||
34 59 990
|
||||
35 8 554
|
||||
35 16 88
|
||||
35 17 411
|
||||
35 48 186
|
||||
35 58 210
|
||||
36 2 919
|
||||
36 3 55
|
||||
36 25 963
|
||||
36 34 722
|
||||
36 46 934
|
||||
36 50 81
|
||||
36 51 618
|
||||
37 0 491
|
||||
37 1 670
|
||||
37 3 456
|
||||
37 7 230
|
||||
37 12 325
|
||||
37 14 741
|
||||
37 28 957
|
||||
37 45 904
|
||||
37 53 892
|
||||
37 55 726
|
||||
38 21 947
|
||||
38 25 297
|
||||
38 42 456
|
||||
38 43 158
|
||||
38 53 712
|
||||
38 59 764
|
||||
39 6 241
|
||||
39 7 873
|
||||
39 8 703
|
||||
39 11 614
|
||||
39 13 652
|
||||
39 25 546
|
||||
39 28 186
|
||||
39 54 610
|
||||
40 0 364
|
||||
40 11 249
|
||||
40 21 787
|
||||
40 48 566
|
||||
41 10 205
|
||||
41 25 967
|
||||
41 37 47
|
||||
42 0 718
|
||||
42 50 559
|
||||
43 15 940
|
||||
43 32 938
|
||||
43 33 39
|
||||
43 39 588
|
||||
43 45 525
|
||||
43 56 49
|
||||
44 2 403
|
||||
44 5 330
|
||||
44 15 919
|
||||
44 37 776
|
||||
44 55 380
|
||||
45 4 189
|
||||
45 32 863
|
||||
45 40 593
|
||||
45 41 951
|
||||
45 44 698
|
||||
45 46 257
|
||||
46 3 832
|
||||
46 6 543
|
||||
46 21 607
|
||||
46 41 690
|
||||
46 48 875
|
||||
47 2 692
|
||||
47 17 788
|
||||
47 20 580
|
||||
47 22 22
|
||||
47 44 398
|
||||
47 50 115
|
||||
48 9 119
|
||||
48 12 795
|
||||
48 14 997
|
||||
48 29 628
|
||||
48 40 147
|
||||
48 45 62
|
||||
48 47 565
|
||||
49 7 658
|
||||
49 23 113
|
||||
49 28 36
|
||||
49 45 553
|
||||
49 53 188
|
||||
50 20 533
|
||||
50 30 444
|
||||
50 32 913
|
||||
50 37 880
|
||||
50 38 537
|
||||
50 47 960
|
||||
51 35 162
|
||||
51 37 577
|
||||
51 46 935
|
||||
52 8 269
|
||||
52 12 217
|
||||
52 31 537
|
||||
52 54 548
|
||||
53 15 296
|
||||
53 19 452
|
||||
53 22 333
|
||||
53 30 700
|
||||
53 55 974
|
||||
54 18 121
|
||||
54 43 692
|
||||
54 50 826
|
||||
54 51 411
|
||||
55 9 693
|
||||
55 13 732
|
||||
55 22 171
|
||||
55 24 167
|
||||
55 35 8
|
||||
55 47 254
|
||||
55 59 354
|
||||
56 9 5
|
||||
56 14 627
|
||||
56 16 774
|
||||
56 19 33
|
||||
56 36 712
|
||||
56 40 176
|
||||
56 49 563
|
||||
56 50 592
|
||||
57 0 102
|
||||
57 9 629
|
||||
57 25 974
|
||||
57 46 558
|
||||
57 48 921
|
||||
57 52 95
|
||||
57 60 459
|
||||
58 9 244
|
||||
58 23 784
|
||||
58 33 709
|
||||
58 43 969
|
||||
58 54 789
|
||||
58 57 153
|
||||
59 2 751
|
||||
59 25 997
|
||||
59 32 229
|
||||
59 40 146
|
||||
59 46 563
|
||||
60 0 173
|
||||
60 4 69
|
||||
60 34 89
|
||||
78 80
|
||||
0 77
|
||||
0 1 1
|
||||
1 2 1
|
||||
2 3 1
|
||||
3 4 1
|
||||
4 5 1
|
||||
5 6 1
|
||||
6 7 1
|
||||
7 8 1
|
||||
8 9 1
|
||||
9 10 1
|
||||
10 11 1
|
||||
11 12 1
|
||||
12 13 1
|
||||
13 14 1
|
||||
14 15 1
|
||||
15 16 1
|
||||
16 17 1
|
||||
17 18 1
|
||||
18 19 1
|
||||
19 20 1
|
||||
20 21 1
|
||||
21 22 1
|
||||
22 23 1
|
||||
23 24 1
|
||||
24 25 1
|
||||
25 26 1
|
||||
26 27 1
|
||||
27 28 1
|
||||
28 29 1
|
||||
29 30 1
|
||||
30 31 1
|
||||
31 32 1
|
||||
32 33 1
|
||||
33 34 1
|
||||
34 35 1
|
||||
35 36 1
|
||||
36 37 1
|
||||
37 38 1
|
||||
38 39 1
|
||||
39 40 1
|
||||
40 41 1
|
||||
41 42 1
|
||||
42 43 1
|
||||
43 44 1
|
||||
44 45 1
|
||||
45 46 1
|
||||
46 47 1
|
||||
47 48 1
|
||||
48 49 1
|
||||
49 50 1
|
||||
50 51 1
|
||||
51 52 1
|
||||
52 53 1
|
||||
53 54 1
|
||||
54 55 1
|
||||
55 56 1
|
||||
56 57 1
|
||||
57 58 1
|
||||
58 59 1
|
||||
59 60 1
|
||||
60 61 1
|
||||
61 62 1
|
||||
62 63 1
|
||||
63 64 1
|
||||
64 65 1
|
||||
65 66 1
|
||||
66 67 1
|
||||
67 68 1
|
||||
68 69 1
|
||||
69 70 1
|
||||
70 71 1
|
||||
71 72 1
|
||||
72 73 1
|
||||
73 74 1
|
||||
74 75 1
|
||||
75 76 1
|
||||
76 77 1
|
||||
0 77 81
|
||||
0 2 3
|
||||
2 77 78
|
||||
0 0
|
||||
54
quase-menor-caminho/input/3
Normal file
54
quase-menor-caminho/input/3
Normal file
@@ -0,0 +1,54 @@
|
||||
8 19
|
||||
0 7
|
||||
0 1 1
|
||||
0 2 1
|
||||
1 5 2
|
||||
2 5 2
|
||||
5 7 2
|
||||
0 7 8
|
||||
0 5 6
|
||||
1 7 7
|
||||
1 4 334
|
||||
2 0 411
|
||||
2 6 176
|
||||
2 7 253
|
||||
3 1 940
|
||||
4 0 479
|
||||
4 6 464
|
||||
5 4 522
|
||||
7 1 430
|
||||
7 4 185
|
||||
7 6 397
|
||||
10 14
|
||||
0 9
|
||||
6 8 746
|
||||
2 4 864
|
||||
9 7 802
|
||||
5 7 715
|
||||
4 1 292
|
||||
8 5 302
|
||||
8 7 245
|
||||
9 8 760
|
||||
7 5 437
|
||||
1 3 746
|
||||
9 6 379
|
||||
4 3 658
|
||||
2 1 856
|
||||
0 4 388
|
||||
12 14
|
||||
0 11
|
||||
0 1 1
|
||||
1 2 1
|
||||
2 3 1
|
||||
3 4 1
|
||||
4 5 1
|
||||
5 6 1
|
||||
6 7 1
|
||||
7 8 1
|
||||
8 9 1
|
||||
9 10 1
|
||||
10 11 1
|
||||
0 11 15
|
||||
0 2 3
|
||||
2 11 12
|
||||
0 0
|
||||
5037
quase-menor-caminho/input/30
Normal file
5037
quase-menor-caminho/input/30
Normal file
File diff suppressed because it is too large
Load Diff
269
quase-menor-caminho/input/31
Normal file
269
quase-menor-caminho/input/31
Normal file
@@ -0,0 +1,269 @@
|
||||
264 266
|
||||
0 263
|
||||
0 1 1
|
||||
1 2 1
|
||||
2 3 1
|
||||
3 4 1
|
||||
4 5 1
|
||||
5 6 1
|
||||
6 7 1
|
||||
7 8 1
|
||||
8 9 1
|
||||
9 10 1
|
||||
10 11 1
|
||||
11 12 1
|
||||
12 13 1
|
||||
13 14 1
|
||||
14 15 1
|
||||
15 16 1
|
||||
16 17 1
|
||||
17 18 1
|
||||
18 19 1
|
||||
19 20 1
|
||||
20 21 1
|
||||
21 22 1
|
||||
22 23 1
|
||||
23 24 1
|
||||
24 25 1
|
||||
25 26 1
|
||||
26 27 1
|
||||
27 28 1
|
||||
28 29 1
|
||||
29 30 1
|
||||
30 31 1
|
||||
31 32 1
|
||||
32 33 1
|
||||
33 34 1
|
||||
34 35 1
|
||||
35 36 1
|
||||
36 37 1
|
||||
37 38 1
|
||||
38 39 1
|
||||
39 40 1
|
||||
40 41 1
|
||||
41 42 1
|
||||
42 43 1
|
||||
43 44 1
|
||||
44 45 1
|
||||
45 46 1
|
||||
46 47 1
|
||||
47 48 1
|
||||
48 49 1
|
||||
49 50 1
|
||||
50 51 1
|
||||
51 52 1
|
||||
52 53 1
|
||||
53 54 1
|
||||
54 55 1
|
||||
55 56 1
|
||||
56 57 1
|
||||
57 58 1
|
||||
58 59 1
|
||||
59 60 1
|
||||
60 61 1
|
||||
61 62 1
|
||||
62 63 1
|
||||
63 64 1
|
||||
64 65 1
|
||||
65 66 1
|
||||
66 67 1
|
||||
67 68 1
|
||||
68 69 1
|
||||
69 70 1
|
||||
70 71 1
|
||||
71 72 1
|
||||
72 73 1
|
||||
73 74 1
|
||||
74 75 1
|
||||
75 76 1
|
||||
76 77 1
|
||||
77 78 1
|
||||
78 79 1
|
||||
79 80 1
|
||||
80 81 1
|
||||
81 82 1
|
||||
82 83 1
|
||||
83 84 1
|
||||
84 85 1
|
||||
85 86 1
|
||||
86 87 1
|
||||
87 88 1
|
||||
88 89 1
|
||||
89 90 1
|
||||
90 91 1
|
||||
91 92 1
|
||||
92 93 1
|
||||
93 94 1
|
||||
94 95 1
|
||||
95 96 1
|
||||
96 97 1
|
||||
97 98 1
|
||||
98 99 1
|
||||
99 100 1
|
||||
100 101 1
|
||||
101 102 1
|
||||
102 103 1
|
||||
103 104 1
|
||||
104 105 1
|
||||
105 106 1
|
||||
106 107 1
|
||||
107 108 1
|
||||
108 109 1
|
||||
109 110 1
|
||||
110 111 1
|
||||
111 112 1
|
||||
112 113 1
|
||||
113 114 1
|
||||
114 115 1
|
||||
115 116 1
|
||||
116 117 1
|
||||
117 118 1
|
||||
118 119 1
|
||||
119 120 1
|
||||
120 121 1
|
||||
121 122 1
|
||||
122 123 1
|
||||
123 124 1
|
||||
124 125 1
|
||||
125 126 1
|
||||
126 127 1
|
||||
127 128 1
|
||||
128 129 1
|
||||
129 130 1
|
||||
130 131 1
|
||||
131 132 1
|
||||
132 133 1
|
||||
133 134 1
|
||||
134 135 1
|
||||
135 136 1
|
||||
136 137 1
|
||||
137 138 1
|
||||
138 139 1
|
||||
139 140 1
|
||||
140 141 1
|
||||
141 142 1
|
||||
142 143 1
|
||||
143 144 1
|
||||
144 145 1
|
||||
145 146 1
|
||||
146 147 1
|
||||
147 148 1
|
||||
148 149 1
|
||||
149 150 1
|
||||
150 151 1
|
||||
151 152 1
|
||||
152 153 1
|
||||
153 154 1
|
||||
154 155 1
|
||||
155 156 1
|
||||
156 157 1
|
||||
157 158 1
|
||||
158 159 1
|
||||
159 160 1
|
||||
160 161 1
|
||||
161 162 1
|
||||
162 163 1
|
||||
163 164 1
|
||||
164 165 1
|
||||
165 166 1
|
||||
166 167 1
|
||||
167 168 1
|
||||
168 169 1
|
||||
169 170 1
|
||||
170 171 1
|
||||
171 172 1
|
||||
172 173 1
|
||||
173 174 1
|
||||
174 175 1
|
||||
175 176 1
|
||||
176 177 1
|
||||
177 178 1
|
||||
178 179 1
|
||||
179 180 1
|
||||
180 181 1
|
||||
181 182 1
|
||||
182 183 1
|
||||
183 184 1
|
||||
184 185 1
|
||||
185 186 1
|
||||
186 187 1
|
||||
187 188 1
|
||||
188 189 1
|
||||
189 190 1
|
||||
190 191 1
|
||||
191 192 1
|
||||
192 193 1
|
||||
193 194 1
|
||||
194 195 1
|
||||
195 196 1
|
||||
196 197 1
|
||||
197 198 1
|
||||
198 199 1
|
||||
199 200 1
|
||||
200 201 1
|
||||
201 202 1
|
||||
202 203 1
|
||||
203 204 1
|
||||
204 205 1
|
||||
205 206 1
|
||||
206 207 1
|
||||
207 208 1
|
||||
208 209 1
|
||||
209 210 1
|
||||
210 211 1
|
||||
211 212 1
|
||||
212 213 1
|
||||
213 214 1
|
||||
214 215 1
|
||||
215 216 1
|
||||
216 217 1
|
||||
217 218 1
|
||||
218 219 1
|
||||
219 220 1
|
||||
220 221 1
|
||||
221 222 1
|
||||
222 223 1
|
||||
223 224 1
|
||||
224 225 1
|
||||
225 226 1
|
||||
226 227 1
|
||||
227 228 1
|
||||
228 229 1
|
||||
229 230 1
|
||||
230 231 1
|
||||
231 232 1
|
||||
232 233 1
|
||||
233 234 1
|
||||
234 235 1
|
||||
235 236 1
|
||||
236 237 1
|
||||
237 238 1
|
||||
238 239 1
|
||||
239 240 1
|
||||
240 241 1
|
||||
241 242 1
|
||||
242 243 1
|
||||
243 244 1
|
||||
244 245 1
|
||||
245 246 1
|
||||
246 247 1
|
||||
247 248 1
|
||||
248 249 1
|
||||
249 250 1
|
||||
250 251 1
|
||||
251 252 1
|
||||
252 253 1
|
||||
253 254 1
|
||||
254 255 1
|
||||
255 256 1
|
||||
256 257 1
|
||||
257 258 1
|
||||
258 259 1
|
||||
259 260 1
|
||||
260 261 1
|
||||
261 262 1
|
||||
262 263 1
|
||||
0 263 267
|
||||
0 2 3
|
||||
2 263 264
|
||||
0 0
|
||||
10658
quase-menor-caminho/input/32
Normal file
10658
quase-menor-caminho/input/32
Normal file
File diff suppressed because it is too large
Load Diff
986
quase-menor-caminho/input/33
Normal file
986
quase-menor-caminho/input/33
Normal file
@@ -0,0 +1,986 @@
|
||||
259 261
|
||||
0 258
|
||||
0 1 1
|
||||
1 2 1
|
||||
2 3 1
|
||||
3 4 1
|
||||
4 5 1
|
||||
5 6 1
|
||||
6 7 1
|
||||
7 8 1
|
||||
8 9 1
|
||||
9 10 1
|
||||
10 11 1
|
||||
11 12 1
|
||||
12 13 1
|
||||
13 14 1
|
||||
14 15 1
|
||||
15 16 1
|
||||
16 17 1
|
||||
17 18 1
|
||||
18 19 1
|
||||
19 20 1
|
||||
20 21 1
|
||||
21 22 1
|
||||
22 23 1
|
||||
23 24 1
|
||||
24 25 1
|
||||
25 26 1
|
||||
26 27 1
|
||||
27 28 1
|
||||
28 29 1
|
||||
29 30 1
|
||||
30 31 1
|
||||
31 32 1
|
||||
32 33 1
|
||||
33 34 1
|
||||
34 35 1
|
||||
35 36 1
|
||||
36 37 1
|
||||
37 38 1
|
||||
38 39 1
|
||||
39 40 1
|
||||
40 41 1
|
||||
41 42 1
|
||||
42 43 1
|
||||
43 44 1
|
||||
44 45 1
|
||||
45 46 1
|
||||
46 47 1
|
||||
47 48 1
|
||||
48 49 1
|
||||
49 50 1
|
||||
50 51 1
|
||||
51 52 1
|
||||
52 53 1
|
||||
53 54 1
|
||||
54 55 1
|
||||
55 56 1
|
||||
56 57 1
|
||||
57 58 1
|
||||
58 59 1
|
||||
59 60 1
|
||||
60 61 1
|
||||
61 62 1
|
||||
62 63 1
|
||||
63 64 1
|
||||
64 65 1
|
||||
65 66 1
|
||||
66 67 1
|
||||
67 68 1
|
||||
68 69 1
|
||||
69 70 1
|
||||
70 71 1
|
||||
71 72 1
|
||||
72 73 1
|
||||
73 74 1
|
||||
74 75 1
|
||||
75 76 1
|
||||
76 77 1
|
||||
77 78 1
|
||||
78 79 1
|
||||
79 80 1
|
||||
80 81 1
|
||||
81 82 1
|
||||
82 83 1
|
||||
83 84 1
|
||||
84 85 1
|
||||
85 86 1
|
||||
86 87 1
|
||||
87 88 1
|
||||
88 89 1
|
||||
89 90 1
|
||||
90 91 1
|
||||
91 92 1
|
||||
92 93 1
|
||||
93 94 1
|
||||
94 95 1
|
||||
95 96 1
|
||||
96 97 1
|
||||
97 98 1
|
||||
98 99 1
|
||||
99 100 1
|
||||
100 101 1
|
||||
101 102 1
|
||||
102 103 1
|
||||
103 104 1
|
||||
104 105 1
|
||||
105 106 1
|
||||
106 107 1
|
||||
107 108 1
|
||||
108 109 1
|
||||
109 110 1
|
||||
110 111 1
|
||||
111 112 1
|
||||
112 113 1
|
||||
113 114 1
|
||||
114 115 1
|
||||
115 116 1
|
||||
116 117 1
|
||||
117 118 1
|
||||
118 119 1
|
||||
119 120 1
|
||||
120 121 1
|
||||
121 122 1
|
||||
122 123 1
|
||||
123 124 1
|
||||
124 125 1
|
||||
125 126 1
|
||||
126 127 1
|
||||
127 128 1
|
||||
128 129 1
|
||||
129 130 1
|
||||
130 131 1
|
||||
131 132 1
|
||||
132 133 1
|
||||
133 134 1
|
||||
134 135 1
|
||||
135 136 1
|
||||
136 137 1
|
||||
137 138 1
|
||||
138 139 1
|
||||
139 140 1
|
||||
140 141 1
|
||||
141 142 1
|
||||
142 143 1
|
||||
143 144 1
|
||||
144 145 1
|
||||
145 146 1
|
||||
146 147 1
|
||||
147 148 1
|
||||
148 149 1
|
||||
149 150 1
|
||||
150 151 1
|
||||
151 152 1
|
||||
152 153 1
|
||||
153 154 1
|
||||
154 155 1
|
||||
155 156 1
|
||||
156 157 1
|
||||
157 158 1
|
||||
158 159 1
|
||||
159 160 1
|
||||
160 161 1
|
||||
161 162 1
|
||||
162 163 1
|
||||
163 164 1
|
||||
164 165 1
|
||||
165 166 1
|
||||
166 167 1
|
||||
167 168 1
|
||||
168 169 1
|
||||
169 170 1
|
||||
170 171 1
|
||||
171 172 1
|
||||
172 173 1
|
||||
173 174 1
|
||||
174 175 1
|
||||
175 176 1
|
||||
176 177 1
|
||||
177 178 1
|
||||
178 179 1
|
||||
179 180 1
|
||||
180 181 1
|
||||
181 182 1
|
||||
182 183 1
|
||||
183 184 1
|
||||
184 185 1
|
||||
185 186 1
|
||||
186 187 1
|
||||
187 188 1
|
||||
188 189 1
|
||||
189 190 1
|
||||
190 191 1
|
||||
191 192 1
|
||||
192 193 1
|
||||
193 194 1
|
||||
194 195 1
|
||||
195 196 1
|
||||
196 197 1
|
||||
197 198 1
|
||||
198 199 1
|
||||
199 200 1
|
||||
200 201 1
|
||||
201 202 1
|
||||
202 203 1
|
||||
203 204 1
|
||||
204 205 1
|
||||
205 206 1
|
||||
206 207 1
|
||||
207 208 1
|
||||
208 209 1
|
||||
209 210 1
|
||||
210 211 1
|
||||
211 212 1
|
||||
212 213 1
|
||||
213 214 1
|
||||
214 215 1
|
||||
215 216 1
|
||||
216 217 1
|
||||
217 218 1
|
||||
218 219 1
|
||||
219 220 1
|
||||
220 221 1
|
||||
221 222 1
|
||||
222 223 1
|
||||
223 224 1
|
||||
224 225 1
|
||||
225 226 1
|
||||
226 227 1
|
||||
227 228 1
|
||||
228 229 1
|
||||
229 230 1
|
||||
230 231 1
|
||||
231 232 1
|
||||
232 233 1
|
||||
233 234 1
|
||||
234 235 1
|
||||
235 236 1
|
||||
236 237 1
|
||||
237 238 1
|
||||
238 239 1
|
||||
239 240 1
|
||||
240 241 1
|
||||
241 242 1
|
||||
242 243 1
|
||||
243 244 1
|
||||
244 245 1
|
||||
245 246 1
|
||||
246 247 1
|
||||
247 248 1
|
||||
248 249 1
|
||||
249 250 1
|
||||
250 251 1
|
||||
251 252 1
|
||||
252 253 1
|
||||
253 254 1
|
||||
254 255 1
|
||||
255 256 1
|
||||
256 257 1
|
||||
257 258 1
|
||||
0 258 262
|
||||
0 2 3
|
||||
2 258 259
|
||||
249 251
|
||||
0 248
|
||||
0 1 1
|
||||
1 2 1
|
||||
2 3 1
|
||||
3 4 1
|
||||
4 5 1
|
||||
5 6 1
|
||||
6 7 1
|
||||
7 8 1
|
||||
8 9 1
|
||||
9 10 1
|
||||
10 11 1
|
||||
11 12 1
|
||||
12 13 1
|
||||
13 14 1
|
||||
14 15 1
|
||||
15 16 1
|
||||
16 17 1
|
||||
17 18 1
|
||||
18 19 1
|
||||
19 20 1
|
||||
20 21 1
|
||||
21 22 1
|
||||
22 23 1
|
||||
23 24 1
|
||||
24 25 1
|
||||
25 26 1
|
||||
26 27 1
|
||||
27 28 1
|
||||
28 29 1
|
||||
29 30 1
|
||||
30 31 1
|
||||
31 32 1
|
||||
32 33 1
|
||||
33 34 1
|
||||
34 35 1
|
||||
35 36 1
|
||||
36 37 1
|
||||
37 38 1
|
||||
38 39 1
|
||||
39 40 1
|
||||
40 41 1
|
||||
41 42 1
|
||||
42 43 1
|
||||
43 44 1
|
||||
44 45 1
|
||||
45 46 1
|
||||
46 47 1
|
||||
47 48 1
|
||||
48 49 1
|
||||
49 50 1
|
||||
50 51 1
|
||||
51 52 1
|
||||
52 53 1
|
||||
53 54 1
|
||||
54 55 1
|
||||
55 56 1
|
||||
56 57 1
|
||||
57 58 1
|
||||
58 59 1
|
||||
59 60 1
|
||||
60 61 1
|
||||
61 62 1
|
||||
62 63 1
|
||||
63 64 1
|
||||
64 65 1
|
||||
65 66 1
|
||||
66 67 1
|
||||
67 68 1
|
||||
68 69 1
|
||||
69 70 1
|
||||
70 71 1
|
||||
71 72 1
|
||||
72 73 1
|
||||
73 74 1
|
||||
74 75 1
|
||||
75 76 1
|
||||
76 77 1
|
||||
77 78 1
|
||||
78 79 1
|
||||
79 80 1
|
||||
80 81 1
|
||||
81 82 1
|
||||
82 83 1
|
||||
83 84 1
|
||||
84 85 1
|
||||
85 86 1
|
||||
86 87 1
|
||||
87 88 1
|
||||
88 89 1
|
||||
89 90 1
|
||||
90 91 1
|
||||
91 92 1
|
||||
92 93 1
|
||||
93 94 1
|
||||
94 95 1
|
||||
95 96 1
|
||||
96 97 1
|
||||
97 98 1
|
||||
98 99 1
|
||||
99 100 1
|
||||
100 101 1
|
||||
101 102 1
|
||||
102 103 1
|
||||
103 104 1
|
||||
104 105 1
|
||||
105 106 1
|
||||
106 107 1
|
||||
107 108 1
|
||||
108 109 1
|
||||
109 110 1
|
||||
110 111 1
|
||||
111 112 1
|
||||
112 113 1
|
||||
113 114 1
|
||||
114 115 1
|
||||
115 116 1
|
||||
116 117 1
|
||||
117 118 1
|
||||
118 119 1
|
||||
119 120 1
|
||||
120 121 1
|
||||
121 122 1
|
||||
122 123 1
|
||||
123 124 1
|
||||
124 125 1
|
||||
125 126 1
|
||||
126 127 1
|
||||
127 128 1
|
||||
128 129 1
|
||||
129 130 1
|
||||
130 131 1
|
||||
131 132 1
|
||||
132 133 1
|
||||
133 134 1
|
||||
134 135 1
|
||||
135 136 1
|
||||
136 137 1
|
||||
137 138 1
|
||||
138 139 1
|
||||
139 140 1
|
||||
140 141 1
|
||||
141 142 1
|
||||
142 143 1
|
||||
143 144 1
|
||||
144 145 1
|
||||
145 146 1
|
||||
146 147 1
|
||||
147 148 1
|
||||
148 149 1
|
||||
149 150 1
|
||||
150 151 1
|
||||
151 152 1
|
||||
152 153 1
|
||||
153 154 1
|
||||
154 155 1
|
||||
155 156 1
|
||||
156 157 1
|
||||
157 158 1
|
||||
158 159 1
|
||||
159 160 1
|
||||
160 161 1
|
||||
161 162 1
|
||||
162 163 1
|
||||
163 164 1
|
||||
164 165 1
|
||||
165 166 1
|
||||
166 167 1
|
||||
167 168 1
|
||||
168 169 1
|
||||
169 170 1
|
||||
170 171 1
|
||||
171 172 1
|
||||
172 173 1
|
||||
173 174 1
|
||||
174 175 1
|
||||
175 176 1
|
||||
176 177 1
|
||||
177 178 1
|
||||
178 179 1
|
||||
179 180 1
|
||||
180 181 1
|
||||
181 182 1
|
||||
182 183 1
|
||||
183 184 1
|
||||
184 185 1
|
||||
185 186 1
|
||||
186 187 1
|
||||
187 188 1
|
||||
188 189 1
|
||||
189 190 1
|
||||
190 191 1
|
||||
191 192 1
|
||||
192 193 1
|
||||
193 194 1
|
||||
194 195 1
|
||||
195 196 1
|
||||
196 197 1
|
||||
197 198 1
|
||||
198 199 1
|
||||
199 200 1
|
||||
200 201 1
|
||||
201 202 1
|
||||
202 203 1
|
||||
203 204 1
|
||||
204 205 1
|
||||
205 206 1
|
||||
206 207 1
|
||||
207 208 1
|
||||
208 209 1
|
||||
209 210 1
|
||||
210 211 1
|
||||
211 212 1
|
||||
212 213 1
|
||||
213 214 1
|
||||
214 215 1
|
||||
215 216 1
|
||||
216 217 1
|
||||
217 218 1
|
||||
218 219 1
|
||||
219 220 1
|
||||
220 221 1
|
||||
221 222 1
|
||||
222 223 1
|
||||
223 224 1
|
||||
224 225 1
|
||||
225 226 1
|
||||
226 227 1
|
||||
227 228 1
|
||||
228 229 1
|
||||
229 230 1
|
||||
230 231 1
|
||||
231 232 1
|
||||
232 233 1
|
||||
233 234 1
|
||||
234 235 1
|
||||
235 236 1
|
||||
236 237 1
|
||||
237 238 1
|
||||
238 239 1
|
||||
239 240 1
|
||||
240 241 1
|
||||
241 242 1
|
||||
242 243 1
|
||||
243 244 1
|
||||
244 245 1
|
||||
245 246 1
|
||||
246 247 1
|
||||
247 248 1
|
||||
0 248 252
|
||||
0 2 3
|
||||
2 248 249
|
||||
169 435
|
||||
0 168
|
||||
0 1 1
|
||||
0 56 1
|
||||
1 112 2
|
||||
56 112 2
|
||||
112 168 2
|
||||
0 168 8
|
||||
0 112 6
|
||||
1 168 7
|
||||
0 78 860
|
||||
0 126 743
|
||||
0 138 365
|
||||
1 141 736
|
||||
2 3 855
|
||||
2 40 141
|
||||
2 45 594
|
||||
2 54 183
|
||||
2 151 944
|
||||
3 109 198
|
||||
3 149 132
|
||||
4 74 518
|
||||
4 128 324
|
||||
4 137 246
|
||||
4 144 825
|
||||
5 70 862
|
||||
5 105 92
|
||||
6 46 704
|
||||
6 123 67
|
||||
6 164 420
|
||||
6 167 384
|
||||
7 29 979
|
||||
8 2 404
|
||||
8 6 601
|
||||
8 41 847
|
||||
9 56 369
|
||||
10 20 249
|
||||
11 144 615
|
||||
11 148 110
|
||||
12 59 286
|
||||
12 132 593
|
||||
12 159 20
|
||||
13 17 681
|
||||
13 62 709
|
||||
13 152 997
|
||||
14 32 883
|
||||
14 48 106
|
||||
14 119 396
|
||||
14 130 986
|
||||
14 155 412
|
||||
15 1 817
|
||||
15 31 333
|
||||
15 130 369
|
||||
16 22 188
|
||||
16 154 707
|
||||
16 165 281
|
||||
17 86 997
|
||||
18 16 148
|
||||
19 31 880
|
||||
19 62 519
|
||||
19 139 329
|
||||
19 167 5
|
||||
20 68 351
|
||||
21 106 443
|
||||
21 139 964
|
||||
21 143 48
|
||||
22 65 496
|
||||
23 143 486
|
||||
24 58 736
|
||||
24 75 782
|
||||
24 96 408
|
||||
24 133 443
|
||||
25 58 440
|
||||
25 86 525
|
||||
25 118 561
|
||||
25 140 819
|
||||
26 87 411
|
||||
27 127 640
|
||||
27 130 156
|
||||
28 36 426
|
||||
28 89 293
|
||||
28 107 584
|
||||
29 40 643
|
||||
29 112 703
|
||||
29 134 526
|
||||
30 49 161
|
||||
30 54 381
|
||||
30 167 582
|
||||
32 34 892
|
||||
32 43 948
|
||||
32 90 310
|
||||
32 98 150
|
||||
32 165 277
|
||||
33 21 280
|
||||
33 85 270
|
||||
33 155 770
|
||||
34 4 660
|
||||
34 89 691
|
||||
34 125 193
|
||||
35 31 444
|
||||
35 142 533
|
||||
36 38 960
|
||||
36 40 937
|
||||
36 93 699
|
||||
36 156 703
|
||||
37 38 755
|
||||
37 60 35
|
||||
37 82 886
|
||||
38 32 787
|
||||
38 117 291
|
||||
38 122 353
|
||||
39 108 316
|
||||
39 160 379
|
||||
40 123 485
|
||||
40 148 124
|
||||
41 30 854
|
||||
41 47 55
|
||||
41 57 281
|
||||
41 97 471
|
||||
42 122 854
|
||||
42 154 83
|
||||
42 155 374
|
||||
43 75 228
|
||||
43 89 701
|
||||
43 118 832
|
||||
43 123 89
|
||||
43 124 321
|
||||
43 134 233
|
||||
44 69 462
|
||||
44 105 810
|
||||
45 52 852
|
||||
46 5 851
|
||||
46 81 321
|
||||
46 99 760
|
||||
47 65 617
|
||||
47 139 428
|
||||
48 41 380
|
||||
48 65 874
|
||||
49 11 91
|
||||
49 144 958
|
||||
50 14 41
|
||||
50 83 834
|
||||
51 113 492
|
||||
52 29 657
|
||||
52 80 53
|
||||
54 153 555
|
||||
55 104 260
|
||||
56 14 231
|
||||
56 60 580
|
||||
56 102 428
|
||||
56 164 669
|
||||
57 11 305
|
||||
57 36 806
|
||||
57 98 430
|
||||
57 149 161
|
||||
58 6 272
|
||||
58 22 329
|
||||
58 71 657
|
||||
58 104 554
|
||||
59 39 405
|
||||
59 64 818
|
||||
59 95 887
|
||||
59 100 588
|
||||
60 98 306
|
||||
60 147 214
|
||||
61 117 498
|
||||
61 167 656
|
||||
62 149 409
|
||||
63 2 457
|
||||
63 43 678
|
||||
63 57 394
|
||||
63 141 109
|
||||
64 49 577
|
||||
64 61 866
|
||||
64 84 757
|
||||
65 31 717
|
||||
66 1 885
|
||||
66 138 377
|
||||
67 1 758
|
||||
67 15 146
|
||||
67 52 961
|
||||
67 61 404
|
||||
68 13 896
|
||||
68 145 935
|
||||
69 2 662
|
||||
69 22 214
|
||||
69 83 884
|
||||
69 106 711
|
||||
69 120 220
|
||||
70 30 971
|
||||
70 34 75
|
||||
70 36 989
|
||||
70 71 724
|
||||
70 93 810
|
||||
70 101 943
|
||||
71 11 722
|
||||
72 8 219
|
||||
72 16 92
|
||||
72 48 432
|
||||
72 55 496
|
||||
72 73 747
|
||||
72 74 749
|
||||
72 77 49
|
||||
72 167 426
|
||||
73 46 144
|
||||
73 50 267
|
||||
73 99 608
|
||||
73 125 434
|
||||
74 72 871
|
||||
74 73 920
|
||||
74 148 833
|
||||
74 150 531
|
||||
75 24 892
|
||||
75 62 100
|
||||
75 83 958
|
||||
75 134 271
|
||||
76 48 497
|
||||
76 165 391
|
||||
78 72 750
|
||||
78 83 278
|
||||
79 39 943
|
||||
79 41 982
|
||||
79 43 497
|
||||
79 61 865
|
||||
79 99 453
|
||||
80 4 968
|
||||
80 91 32
|
||||
80 152 837
|
||||
81 83 402
|
||||
81 121 433
|
||||
82 106 456
|
||||
82 112 422
|
||||
82 144 471
|
||||
83 63 808
|
||||
84 139 848
|
||||
84 147 197
|
||||
85 28 635
|
||||
86 12 122
|
||||
86 95 998
|
||||
86 127 734
|
||||
86 160 224
|
||||
87 34 358
|
||||
88 9 515
|
||||
88 95 675
|
||||
90 3 220
|
||||
90 11 330
|
||||
90 99 959
|
||||
90 131 656
|
||||
91 7 28
|
||||
91 95 189
|
||||
92 37 534
|
||||
92 121 435
|
||||
92 126 48
|
||||
93 98 459
|
||||
93 120 422
|
||||
93 137 94
|
||||
93 147 424
|
||||
93 164 480
|
||||
94 40 791
|
||||
94 113 410
|
||||
94 148 188
|
||||
95 39 20
|
||||
95 55 799
|
||||
95 94 906
|
||||
95 121 485
|
||||
95 125 577
|
||||
96 8 932
|
||||
96 22 350
|
||||
96 72 458
|
||||
96 99 897
|
||||
97 0 253
|
||||
97 118 339
|
||||
98 69 289
|
||||
98 141 779
|
||||
99 17 176
|
||||
99 122 141
|
||||
100 4 903
|
||||
100 17 199
|
||||
100 19 485
|
||||
101 48 652
|
||||
101 79 477
|
||||
101 124 510
|
||||
102 4 948
|
||||
102 158 825
|
||||
103 47 745
|
||||
103 102 59
|
||||
103 110 765
|
||||
103 118 784
|
||||
104 92 538
|
||||
104 109 952
|
||||
104 136 947
|
||||
104 159 96
|
||||
105 36 160
|
||||
105 101 280
|
||||
106 24 481
|
||||
106 90 677
|
||||
107 27 757
|
||||
107 62 123
|
||||
107 68 425
|
||||
108 111 55
|
||||
109 103 975
|
||||
110 43 488
|
||||
110 149 574
|
||||
110 167 895
|
||||
111 58 974
|
||||
111 69 59
|
||||
111 124 498
|
||||
112 46 85
|
||||
112 51 193
|
||||
112 143 354
|
||||
112 148 720
|
||||
113 66 214
|
||||
114 61 21
|
||||
114 86 284
|
||||
114 149 421
|
||||
115 2 999
|
||||
115 17 306
|
||||
115 72 7
|
||||
116 25 46
|
||||
116 152 686
|
||||
117 14 9
|
||||
117 83 348
|
||||
118 68 248
|
||||
118 89 749
|
||||
118 109 350
|
||||
118 116 837
|
||||
119 21 618
|
||||
119 23 635
|
||||
120 125 303
|
||||
121 36 198
|
||||
121 55 61
|
||||
121 78 832
|
||||
121 130 133
|
||||
121 151 433
|
||||
122 75 101
|
||||
122 135 448
|
||||
123 42 389
|
||||
123 166 610
|
||||
124 55 836
|
||||
124 157 560
|
||||
125 40 813
|
||||
125 56 722
|
||||
125 109 184
|
||||
127 41 409
|
||||
127 117 450
|
||||
127 136 964
|
||||
127 155 542
|
||||
127 159 792
|
||||
128 83 456
|
||||
128 90 344
|
||||
128 104 649
|
||||
128 148 836
|
||||
129 46 327
|
||||
129 67 705
|
||||
129 118 16
|
||||
129 135 407
|
||||
129 156 112
|
||||
130 41 774
|
||||
130 55 535
|
||||
130 81 965
|
||||
130 101 624
|
||||
130 159 846
|
||||
131 38 116
|
||||
131 124 556
|
||||
132 82 816
|
||||
132 144 688
|
||||
133 161 789
|
||||
133 163 667
|
||||
134 144 178
|
||||
135 54 136
|
||||
136 0 78
|
||||
136 56 234
|
||||
136 58 754
|
||||
136 120 592
|
||||
136 144 261
|
||||
137 33 547
|
||||
137 115 965
|
||||
139 68 496
|
||||
141 49 731
|
||||
142 57 656
|
||||
142 163 535
|
||||
143 24 343
|
||||
143 43 289
|
||||
143 49 985
|
||||
143 81 926
|
||||
143 155 259
|
||||
145 74 475
|
||||
145 97 426
|
||||
146 91 194
|
||||
146 100 465
|
||||
146 104 522
|
||||
146 131 186
|
||||
147 75 405
|
||||
147 105 141
|
||||
147 107 822
|
||||
147 123 128
|
||||
149 49 417
|
||||
150 3 191
|
||||
150 5 107
|
||||
150 98 421
|
||||
150 132 128
|
||||
151 12 51
|
||||
151 52 812
|
||||
151 114 804
|
||||
151 123 876
|
||||
152 63 604
|
||||
152 76 335
|
||||
152 105 648
|
||||
152 129 583
|
||||
153 15 291
|
||||
153 48 162
|
||||
153 52 626
|
||||
154 97 708
|
||||
155 81 704
|
||||
155 104 488
|
||||
156 76 938
|
||||
156 83 499
|
||||
156 158 665
|
||||
158 64 976
|
||||
158 94 630
|
||||
158 119 307
|
||||
159 105 223
|
||||
159 118 74
|
||||
161 3 169
|
||||
161 11 741
|
||||
161 60 167
|
||||
161 73 592
|
||||
161 74 364
|
||||
162 60 661
|
||||
162 138 238
|
||||
163 47 226
|
||||
164 119 832
|
||||
164 135 706
|
||||
166 54 643
|
||||
166 83 669
|
||||
167 111 745
|
||||
168 15 540
|
||||
28 30
|
||||
0 27
|
||||
0 1 1
|
||||
1 2 1
|
||||
2 3 1
|
||||
3 4 1
|
||||
4 5 1
|
||||
5 6 1
|
||||
6 7 1
|
||||
7 8 1
|
||||
8 9 1
|
||||
9 10 1
|
||||
10 11 1
|
||||
11 12 1
|
||||
12 13 1
|
||||
13 14 1
|
||||
14 15 1
|
||||
15 16 1
|
||||
16 17 1
|
||||
17 18 1
|
||||
18 19 1
|
||||
19 20 1
|
||||
20 21 1
|
||||
21 22 1
|
||||
22 23 1
|
||||
23 24 1
|
||||
24 25 1
|
||||
25 26 1
|
||||
26 27 1
|
||||
0 27 31
|
||||
0 2 3
|
||||
2 27 28
|
||||
0 0
|
||||
1656
quase-menor-caminho/input/34
Normal file
1656
quase-menor-caminho/input/34
Normal file
File diff suppressed because it is too large
Load Diff
1315
quase-menor-caminho/input/35
Normal file
1315
quase-menor-caminho/input/35
Normal file
File diff suppressed because it is too large
Load Diff
13208
quase-menor-caminho/input/36
Normal file
13208
quase-menor-caminho/input/36
Normal file
File diff suppressed because it is too large
Load Diff
270
quase-menor-caminho/input/37
Normal file
270
quase-menor-caminho/input/37
Normal file
@@ -0,0 +1,270 @@
|
||||
265 267
|
||||
0 264
|
||||
0 1 1
|
||||
1 2 1
|
||||
2 3 1
|
||||
3 4 1
|
||||
4 5 1
|
||||
5 6 1
|
||||
6 7 1
|
||||
7 8 1
|
||||
8 9 1
|
||||
9 10 1
|
||||
10 11 1
|
||||
11 12 1
|
||||
12 13 1
|
||||
13 14 1
|
||||
14 15 1
|
||||
15 16 1
|
||||
16 17 1
|
||||
17 18 1
|
||||
18 19 1
|
||||
19 20 1
|
||||
20 21 1
|
||||
21 22 1
|
||||
22 23 1
|
||||
23 24 1
|
||||
24 25 1
|
||||
25 26 1
|
||||
26 27 1
|
||||
27 28 1
|
||||
28 29 1
|
||||
29 30 1
|
||||
30 31 1
|
||||
31 32 1
|
||||
32 33 1
|
||||
33 34 1
|
||||
34 35 1
|
||||
35 36 1
|
||||
36 37 1
|
||||
37 38 1
|
||||
38 39 1
|
||||
39 40 1
|
||||
40 41 1
|
||||
41 42 1
|
||||
42 43 1
|
||||
43 44 1
|
||||
44 45 1
|
||||
45 46 1
|
||||
46 47 1
|
||||
47 48 1
|
||||
48 49 1
|
||||
49 50 1
|
||||
50 51 1
|
||||
51 52 1
|
||||
52 53 1
|
||||
53 54 1
|
||||
54 55 1
|
||||
55 56 1
|
||||
56 57 1
|
||||
57 58 1
|
||||
58 59 1
|
||||
59 60 1
|
||||
60 61 1
|
||||
61 62 1
|
||||
62 63 1
|
||||
63 64 1
|
||||
64 65 1
|
||||
65 66 1
|
||||
66 67 1
|
||||
67 68 1
|
||||
68 69 1
|
||||
69 70 1
|
||||
70 71 1
|
||||
71 72 1
|
||||
72 73 1
|
||||
73 74 1
|
||||
74 75 1
|
||||
75 76 1
|
||||
76 77 1
|
||||
77 78 1
|
||||
78 79 1
|
||||
79 80 1
|
||||
80 81 1
|
||||
81 82 1
|
||||
82 83 1
|
||||
83 84 1
|
||||
84 85 1
|
||||
85 86 1
|
||||
86 87 1
|
||||
87 88 1
|
||||
88 89 1
|
||||
89 90 1
|
||||
90 91 1
|
||||
91 92 1
|
||||
92 93 1
|
||||
93 94 1
|
||||
94 95 1
|
||||
95 96 1
|
||||
96 97 1
|
||||
97 98 1
|
||||
98 99 1
|
||||
99 100 1
|
||||
100 101 1
|
||||
101 102 1
|
||||
102 103 1
|
||||
103 104 1
|
||||
104 105 1
|
||||
105 106 1
|
||||
106 107 1
|
||||
107 108 1
|
||||
108 109 1
|
||||
109 110 1
|
||||
110 111 1
|
||||
111 112 1
|
||||
112 113 1
|
||||
113 114 1
|
||||
114 115 1
|
||||
115 116 1
|
||||
116 117 1
|
||||
117 118 1
|
||||
118 119 1
|
||||
119 120 1
|
||||
120 121 1
|
||||
121 122 1
|
||||
122 123 1
|
||||
123 124 1
|
||||
124 125 1
|
||||
125 126 1
|
||||
126 127 1
|
||||
127 128 1
|
||||
128 129 1
|
||||
129 130 1
|
||||
130 131 1
|
||||
131 132 1
|
||||
132 133 1
|
||||
133 134 1
|
||||
134 135 1
|
||||
135 136 1
|
||||
136 137 1
|
||||
137 138 1
|
||||
138 139 1
|
||||
139 140 1
|
||||
140 141 1
|
||||
141 142 1
|
||||
142 143 1
|
||||
143 144 1
|
||||
144 145 1
|
||||
145 146 1
|
||||
146 147 1
|
||||
147 148 1
|
||||
148 149 1
|
||||
149 150 1
|
||||
150 151 1
|
||||
151 152 1
|
||||
152 153 1
|
||||
153 154 1
|
||||
154 155 1
|
||||
155 156 1
|
||||
156 157 1
|
||||
157 158 1
|
||||
158 159 1
|
||||
159 160 1
|
||||
160 161 1
|
||||
161 162 1
|
||||
162 163 1
|
||||
163 164 1
|
||||
164 165 1
|
||||
165 166 1
|
||||
166 167 1
|
||||
167 168 1
|
||||
168 169 1
|
||||
169 170 1
|
||||
170 171 1
|
||||
171 172 1
|
||||
172 173 1
|
||||
173 174 1
|
||||
174 175 1
|
||||
175 176 1
|
||||
176 177 1
|
||||
177 178 1
|
||||
178 179 1
|
||||
179 180 1
|
||||
180 181 1
|
||||
181 182 1
|
||||
182 183 1
|
||||
183 184 1
|
||||
184 185 1
|
||||
185 186 1
|
||||
186 187 1
|
||||
187 188 1
|
||||
188 189 1
|
||||
189 190 1
|
||||
190 191 1
|
||||
191 192 1
|
||||
192 193 1
|
||||
193 194 1
|
||||
194 195 1
|
||||
195 196 1
|
||||
196 197 1
|
||||
197 198 1
|
||||
198 199 1
|
||||
199 200 1
|
||||
200 201 1
|
||||
201 202 1
|
||||
202 203 1
|
||||
203 204 1
|
||||
204 205 1
|
||||
205 206 1
|
||||
206 207 1
|
||||
207 208 1
|
||||
208 209 1
|
||||
209 210 1
|
||||
210 211 1
|
||||
211 212 1
|
||||
212 213 1
|
||||
213 214 1
|
||||
214 215 1
|
||||
215 216 1
|
||||
216 217 1
|
||||
217 218 1
|
||||
218 219 1
|
||||
219 220 1
|
||||
220 221 1
|
||||
221 222 1
|
||||
222 223 1
|
||||
223 224 1
|
||||
224 225 1
|
||||
225 226 1
|
||||
226 227 1
|
||||
227 228 1
|
||||
228 229 1
|
||||
229 230 1
|
||||
230 231 1
|
||||
231 232 1
|
||||
232 233 1
|
||||
233 234 1
|
||||
234 235 1
|
||||
235 236 1
|
||||
236 237 1
|
||||
237 238 1
|
||||
238 239 1
|
||||
239 240 1
|
||||
240 241 1
|
||||
241 242 1
|
||||
242 243 1
|
||||
243 244 1
|
||||
244 245 1
|
||||
245 246 1
|
||||
246 247 1
|
||||
247 248 1
|
||||
248 249 1
|
||||
249 250 1
|
||||
250 251 1
|
||||
251 252 1
|
||||
252 253 1
|
||||
253 254 1
|
||||
254 255 1
|
||||
255 256 1
|
||||
256 257 1
|
||||
257 258 1
|
||||
258 259 1
|
||||
259 260 1
|
||||
260 261 1
|
||||
261 262 1
|
||||
262 263 1
|
||||
263 264 1
|
||||
0 264 268
|
||||
0 2 3
|
||||
2 264 265
|
||||
0 0
|
||||
6572
quase-menor-caminho/input/38
Normal file
6572
quase-menor-caminho/input/38
Normal file
File diff suppressed because it is too large
Load Diff
9319
quase-menor-caminho/input/39
Normal file
9319
quase-menor-caminho/input/39
Normal file
File diff suppressed because it is too large
Load Diff
20
quase-menor-caminho/input/4
Normal file
20
quase-menor-caminho/input/4
Normal file
@@ -0,0 +1,20 @@
|
||||
5 8
|
||||
0 4
|
||||
0 1 1
|
||||
1 4 2
|
||||
0 2 1
|
||||
2 4 2
|
||||
0 3 4
|
||||
3 4 1
|
||||
1 3 10
|
||||
2 3 10
|
||||
6 7
|
||||
5 0
|
||||
5 1 2
|
||||
1 0 2
|
||||
5 2 2
|
||||
2 0 2
|
||||
5 3 5
|
||||
3 4 1
|
||||
4 0 1
|
||||
0 0
|
||||
10003
quase-menor-caminho/input/40
Normal file
10003
quase-menor-caminho/input/40
Normal file
File diff suppressed because it is too large
Load Diff
10003
quase-menor-caminho/input/41
Normal file
10003
quase-menor-caminho/input/41
Normal file
File diff suppressed because it is too large
Load Diff
9556
quase-menor-caminho/input/42
Normal file
9556
quase-menor-caminho/input/42
Normal file
File diff suppressed because it is too large
Load Diff
4100
quase-menor-caminho/input/43
Normal file
4100
quase-menor-caminho/input/43
Normal file
File diff suppressed because it is too large
Load Diff
1530
quase-menor-caminho/input/5
Normal file
1530
quase-menor-caminho/input/5
Normal file
File diff suppressed because it is too large
Load Diff
301
quase-menor-caminho/input/6
Normal file
301
quase-menor-caminho/input/6
Normal file
@@ -0,0 +1,301 @@
|
||||
21 298
|
||||
0 11
|
||||
0 16 9
|
||||
16 9 6
|
||||
9 11 10
|
||||
0 1 220
|
||||
0 2 527
|
||||
0 3 566
|
||||
0 11 578
|
||||
0 12 163
|
||||
0 13 372
|
||||
0 14 458
|
||||
0 15 175
|
||||
0 17 297
|
||||
0 18 813
|
||||
0 19 925
|
||||
0 20 134
|
||||
1 0 474
|
||||
1 2 794
|
||||
1 3 902
|
||||
1 4 344
|
||||
1 5 732
|
||||
1 6 704
|
||||
1 7 96
|
||||
1 8 276
|
||||
1 10 677
|
||||
1 11 843
|
||||
1 12 346
|
||||
1 13 272
|
||||
1 14 409
|
||||
1 15 509
|
||||
1 17 437
|
||||
1 18 309
|
||||
1 19 437
|
||||
2 0 838
|
||||
2 1 578
|
||||
2 3 629
|
||||
2 4 575
|
||||
2 5 457
|
||||
2 6 605
|
||||
2 7 277
|
||||
2 8 473
|
||||
2 9 85
|
||||
2 10 761
|
||||
2 12 630
|
||||
2 15 717
|
||||
2 17 182
|
||||
2 18 129
|
||||
2 19 518
|
||||
2 20 833
|
||||
3 0 575
|
||||
3 1 613
|
||||
3 4 920
|
||||
3 5 166
|
||||
3 6 976
|
||||
3 7 811
|
||||
3 8 479
|
||||
3 9 659
|
||||
3 11 845
|
||||
3 12 627
|
||||
3 13 374
|
||||
3 14 699
|
||||
3 15 485
|
||||
3 16 599
|
||||
3 17 566
|
||||
3 19 90
|
||||
3 20 737
|
||||
4 0 412
|
||||
4 3 270
|
||||
4 5 634
|
||||
4 6 135
|
||||
4 7 503
|
||||
4 9 73
|
||||
4 10 343
|
||||
4 11 608
|
||||
4 13 423
|
||||
4 14 140
|
||||
4 16 940
|
||||
4 17 285
|
||||
4 18 956
|
||||
4 19 506
|
||||
4 20 916
|
||||
5 0 588
|
||||
5 1 7
|
||||
5 2 840
|
||||
5 3 457
|
||||
5 4 386
|
||||
5 8 393
|
||||
5 9 338
|
||||
5 10 47
|
||||
5 11 466
|
||||
5 12 869
|
||||
5 14 869
|
||||
5 15 279
|
||||
5 18 133
|
||||
5 19 68
|
||||
5 20 930
|
||||
6 1 786
|
||||
6 3 789
|
||||
6 7 533
|
||||
6 8 134
|
||||
6 10 172
|
||||
6 12 375
|
||||
6 13 438
|
||||
6 14 511
|
||||
6 16 549
|
||||
6 18 359
|
||||
6 19 777
|
||||
7 1 317
|
||||
7 2 997
|
||||
7 3 82
|
||||
7 4 804
|
||||
7 5 87
|
||||
7 8 837
|
||||
7 9 835
|
||||
7 10 370
|
||||
7 11 815
|
||||
7 13 322
|
||||
7 15 593
|
||||
7 16 738
|
||||
7 17 716
|
||||
7 18 956
|
||||
7 19 978
|
||||
7 20 23
|
||||
8 0 92
|
||||
8 1 312
|
||||
8 3 707
|
||||
8 4 53
|
||||
8 5 941
|
||||
8 6 953
|
||||
8 7 114
|
||||
8 9 145
|
||||
8 10 60
|
||||
8 11 655
|
||||
8 16 147
|
||||
8 18 87
|
||||
8 19 63
|
||||
8 20 336
|
||||
9 1 730
|
||||
9 3 148
|
||||
9 6 879
|
||||
9 7 23
|
||||
9 8 980
|
||||
9 10 840
|
||||
9 15 311
|
||||
9 17 59
|
||||
9 18 243
|
||||
9 19 953
|
||||
9 20 590
|
||||
10 2 619
|
||||
10 3 457
|
||||
10 4 318
|
||||
10 9 404
|
||||
10 11 840
|
||||
10 12 446
|
||||
10 14 72
|
||||
10 15 178
|
||||
10 19 721
|
||||
11 0 843
|
||||
11 1 924
|
||||
11 2 950
|
||||
11 3 149
|
||||
11 4 347
|
||||
11 6 729
|
||||
11 7 120
|
||||
11 9 589
|
||||
11 10 523
|
||||
11 12 350
|
||||
11 13 815
|
||||
11 15 823
|
||||
11 16 178
|
||||
11 17 38
|
||||
11 18 477
|
||||
11 20 472
|
||||
12 0 789
|
||||
12 1 909
|
||||
12 2 990
|
||||
12 3 49
|
||||
12 4 15
|
||||
12 5 969
|
||||
12 6 657
|
||||
12 7 860
|
||||
12 8 831
|
||||
12 9 894
|
||||
12 10 291
|
||||
12 11 10
|
||||
12 13 394
|
||||
12 15 872
|
||||
12 16 342
|
||||
12 18 33
|
||||
12 19 125
|
||||
13 0 784
|
||||
13 1 602
|
||||
13 2 620
|
||||
13 3 183
|
||||
13 4 675
|
||||
13 5 353
|
||||
13 9 266
|
||||
13 10 48
|
||||
13 11 334
|
||||
13 12 601
|
||||
13 14 236
|
||||
13 15 251
|
||||
13 17 866
|
||||
13 18 66
|
||||
13 20 525
|
||||
14 2 538
|
||||
14 3 512
|
||||
14 4 604
|
||||
14 6 763
|
||||
14 7 478
|
||||
14 10 501
|
||||
14 12 96
|
||||
14 13 427
|
||||
14 15 603
|
||||
14 16 572
|
||||
14 18 437
|
||||
14 19 428
|
||||
14 20 753
|
||||
15 0 74
|
||||
15 1 370
|
||||
15 3 696
|
||||
15 4 467
|
||||
15 5 615
|
||||
15 6 571
|
||||
15 7 554
|
||||
15 8 24
|
||||
15 9 874
|
||||
15 10 393
|
||||
15 12 596
|
||||
15 13 904
|
||||
15 14 984
|
||||
15 16 338
|
||||
15 17 563
|
||||
15 18 336
|
||||
15 19 966
|
||||
15 20 440
|
||||
16 0 341
|
||||
16 1 779
|
||||
16 2 207
|
||||
16 4 50
|
||||
16 5 498
|
||||
16 6 826
|
||||
16 7 688
|
||||
16 10 201
|
||||
16 11 928
|
||||
16 13 741
|
||||
16 14 988
|
||||
16 17 575
|
||||
16 18 141
|
||||
17 0 882
|
||||
17 2 231
|
||||
17 3 252
|
||||
17 4 532
|
||||
17 5 929
|
||||
17 7 499
|
||||
17 8 283
|
||||
17 10 717
|
||||
17 12 247
|
||||
17 15 336
|
||||
17 16 474
|
||||
17 18 185
|
||||
17 19 332
|
||||
18 1 504
|
||||
18 2 266
|
||||
18 3 129
|
||||
18 5 160
|
||||
18 7 256
|
||||
18 10 899
|
||||
18 13 334
|
||||
18 14 906
|
||||
18 15 417
|
||||
18 20 362
|
||||
19 0 178
|
||||
19 1 38
|
||||
19 3 725
|
||||
19 4 288
|
||||
19 5 610
|
||||
19 9 771
|
||||
19 10 911
|
||||
19 11 960
|
||||
19 12 903
|
||||
19 13 220
|
||||
19 14 511
|
||||
19 15 461
|
||||
19 17 324
|
||||
19 18 931
|
||||
19 20 391
|
||||
20 0 820
|
||||
20 1 507
|
||||
20 2 505
|
||||
20 4 815
|
||||
20 5 721
|
||||
20 7 304
|
||||
20 8 555
|
||||
20 9 729
|
||||
20 10 919
|
||||
20 11 572
|
||||
20 12 971
|
||||
20 18 537
|
||||
0 0
|
||||
95
quase-menor-caminho/input/7
Normal file
95
quase-menor-caminho/input/7
Normal file
@@ -0,0 +1,95 @@
|
||||
13 15
|
||||
0 12
|
||||
0 1 1
|
||||
1 2 1
|
||||
2 3 1
|
||||
3 4 1
|
||||
4 5 1
|
||||
5 6 1
|
||||
6 7 1
|
||||
7 8 1
|
||||
8 9 1
|
||||
9 10 1
|
||||
10 11 1
|
||||
11 12 1
|
||||
0 12 16
|
||||
0 2 3
|
||||
2 12 13
|
||||
5 13
|
||||
0 4
|
||||
0 1 1
|
||||
0 2 1
|
||||
1 3 2
|
||||
2 3 2
|
||||
3 4 2
|
||||
0 4 8
|
||||
0 3 6
|
||||
1 4 7
|
||||
2 4 78
|
||||
3 1 532
|
||||
4 1 131
|
||||
4 2 687
|
||||
4 3 574
|
||||
24 26
|
||||
0 23
|
||||
0 1 1
|
||||
1 2 1
|
||||
2 3 1
|
||||
3 4 1
|
||||
4 5 1
|
||||
5 6 1
|
||||
6 7 1
|
||||
7 8 1
|
||||
8 9 1
|
||||
9 10 1
|
||||
10 11 1
|
||||
11 12 1
|
||||
12 13 1
|
||||
13 14 1
|
||||
14 15 1
|
||||
15 16 1
|
||||
16 17 1
|
||||
17 18 1
|
||||
18 19 1
|
||||
19 20 1
|
||||
20 21 1
|
||||
21 22 1
|
||||
22 23 1
|
||||
0 23 27
|
||||
0 2 3
|
||||
2 23 24
|
||||
30 32
|
||||
0 29
|
||||
0 1 1
|
||||
1 2 1
|
||||
2 3 1
|
||||
3 4 1
|
||||
4 5 1
|
||||
5 6 1
|
||||
6 7 1
|
||||
7 8 1
|
||||
8 9 1
|
||||
9 10 1
|
||||
10 11 1
|
||||
11 12 1
|
||||
12 13 1
|
||||
13 14 1
|
||||
14 15 1
|
||||
15 16 1
|
||||
16 17 1
|
||||
17 18 1
|
||||
18 19 1
|
||||
19 20 1
|
||||
20 21 1
|
||||
21 22 1
|
||||
22 23 1
|
||||
23 24 1
|
||||
24 25 1
|
||||
25 26 1
|
||||
26 27 1
|
||||
27 28 1
|
||||
28 29 1
|
||||
0 29 33
|
||||
0 2 3
|
||||
2 29 30
|
||||
0 0
|
||||
456
quase-menor-caminho/input/8
Normal file
456
quase-menor-caminho/input/8
Normal file
@@ -0,0 +1,456 @@
|
||||
10 38
|
||||
0 9
|
||||
0 1 1
|
||||
0 3 1
|
||||
1 6 2
|
||||
3 6 2
|
||||
6 9 2
|
||||
0 9 8
|
||||
0 6 6
|
||||
1 9 7
|
||||
0 2 325
|
||||
0 7 783
|
||||
0 8 866
|
||||
1 4 579
|
||||
1 5 585
|
||||
1 8 598
|
||||
2 0 781
|
||||
2 4 241
|
||||
2 6 328
|
||||
2 7 35
|
||||
2 9 746
|
||||
3 2 148
|
||||
3 4 450
|
||||
3 9 344
|
||||
4 1 860
|
||||
4 3 938
|
||||
5 1 983
|
||||
5 8 293
|
||||
5 9 775
|
||||
6 1 436
|
||||
6 4 481
|
||||
7 3 99
|
||||
7 4 344
|
||||
7 9 373
|
||||
8 0 638
|
||||
8 1 241
|
||||
8 4 464
|
||||
8 6 287
|
||||
8 9 380
|
||||
9 1 718
|
||||
19 139
|
||||
0 18
|
||||
0 1 1
|
||||
0 6 1
|
||||
1 12 2
|
||||
6 12 2
|
||||
12 18 2
|
||||
0 18 8
|
||||
0 12 6
|
||||
1 18 7
|
||||
0 5 682
|
||||
0 8 646
|
||||
0 10 22
|
||||
0 13 483
|
||||
0 14 701
|
||||
0 15 676
|
||||
1 5 341
|
||||
1 6 79
|
||||
1 10 787
|
||||
1 16 93
|
||||
2 0 975
|
||||
2 4 280
|
||||
2 6 165
|
||||
2 7 328
|
||||
2 9 467
|
||||
2 15 363
|
||||
2 16 975
|
||||
3 1 968
|
||||
3 6 722
|
||||
3 8 637
|
||||
3 11 79
|
||||
4 0 162
|
||||
4 3 963
|
||||
4 9 290
|
||||
4 11 859
|
||||
4 12 19
|
||||
4 13 515
|
||||
4 14 74
|
||||
4 16 43
|
||||
5 0 987
|
||||
5 2 620
|
||||
5 3 879
|
||||
5 11 173
|
||||
5 12 165
|
||||
5 15 680
|
||||
6 1 661
|
||||
6 2 9
|
||||
6 3 888
|
||||
6 7 590
|
||||
6 9 652
|
||||
6 14 272
|
||||
7 4 895
|
||||
7 5 842
|
||||
7 8 37
|
||||
7 11 32
|
||||
7 12 565
|
||||
7 15 491
|
||||
8 2 404
|
||||
8 3 125
|
||||
8 6 302
|
||||
8 11 380
|
||||
8 12 680
|
||||
8 13 292
|
||||
8 16 998
|
||||
8 17 274
|
||||
9 5 295
|
||||
9 8 412
|
||||
9 13 378
|
||||
9 16 309
|
||||
9 17 623
|
||||
10 1 915
|
||||
10 2 823
|
||||
10 3 187
|
||||
10 7 64
|
||||
10 8 545
|
||||
10 15 184
|
||||
10 16 822
|
||||
11 2 652
|
||||
11 5 943
|
||||
11 6 915
|
||||
11 10 521
|
||||
11 15 278
|
||||
11 16 855
|
||||
11 17 979
|
||||
11 18 664
|
||||
12 2 690
|
||||
12 7 502
|
||||
12 13 536
|
||||
12 14 647
|
||||
12 17 458
|
||||
13 0 943
|
||||
13 3 284
|
||||
13 7 951
|
||||
13 9 56
|
||||
13 15 822
|
||||
14 0 787
|
||||
14 1 623
|
||||
14 6 696
|
||||
14 9 168
|
||||
14 10 191
|
||||
14 11 875
|
||||
14 12 554
|
||||
14 13 140
|
||||
14 15 972
|
||||
14 16 843
|
||||
14 17 609
|
||||
15 1 758
|
||||
15 3 722
|
||||
15 7 121
|
||||
15 8 863
|
||||
15 10 91
|
||||
15 12 246
|
||||
15 17 120
|
||||
16 1 474
|
||||
16 2 801
|
||||
16 4 999
|
||||
16 7 593
|
||||
16 8 24
|
||||
16 9 144
|
||||
16 10 173
|
||||
16 12 82
|
||||
16 13 410
|
||||
16 14 192
|
||||
17 0 661
|
||||
17 2 978
|
||||
17 4 343
|
||||
17 5 979
|
||||
17 6 414
|
||||
17 9 733
|
||||
17 15 630
|
||||
17 16 117
|
||||
17 18 64
|
||||
18 4 825
|
||||
18 7 720
|
||||
18 8 59
|
||||
18 10 678
|
||||
18 12 404
|
||||
18 13 387
|
||||
18 14 116
|
||||
18 16 40
|
||||
18 17 989
|
||||
17 272
|
||||
0 16
|
||||
0 1 1
|
||||
0 5 1
|
||||
1 11 2
|
||||
5 11 2
|
||||
11 16 2
|
||||
0 16 8
|
||||
0 11 6
|
||||
1 16 7
|
||||
0 2 894
|
||||
0 3 595
|
||||
0 4 714
|
||||
0 6 204
|
||||
0 7 781
|
||||
0 8 314
|
||||
0 9 399
|
||||
0 10 979
|
||||
0 12 471
|
||||
0 13 510
|
||||
0 14 807
|
||||
0 15 765
|
||||
1 0 106
|
||||
1 2 718
|
||||
1 3 985
|
||||
1 4 255
|
||||
1 5 716
|
||||
1 6 878
|
||||
1 7 728
|
||||
1 8 146
|
||||
1 9 931
|
||||
1 10 391
|
||||
1 12 289
|
||||
1 13 676
|
||||
1 14 33
|
||||
1 15 932
|
||||
2 0 104
|
||||
2 1 216
|
||||
2 3 469
|
||||
2 4 734
|
||||
2 5 578
|
||||
2 6 432
|
||||
2 7 393
|
||||
2 8 785
|
||||
2 9 335
|
||||
2 10 964
|
||||
2 11 896
|
||||
2 12 198
|
||||
2 13 731
|
||||
2 14 520
|
||||
2 15 621
|
||||
2 16 56
|
||||
3 0 87
|
||||
3 1 270
|
||||
3 2 147
|
||||
3 4 796
|
||||
3 5 353
|
||||
3 6 185
|
||||
3 7 490
|
||||
3 8 911
|
||||
3 9 448
|
||||
3 10 720
|
||||
3 11 181
|
||||
3 12 154
|
||||
3 13 346
|
||||
3 14 400
|
||||
3 15 653
|
||||
3 16 975
|
||||
4 0 640
|
||||
4 1 996
|
||||
4 2 311
|
||||
4 3 41
|
||||
4 5 140
|
||||
4 6 834
|
||||
4 7 667
|
||||
4 8 353
|
||||
4 9 964
|
||||
4 10 709
|
||||
4 11 292
|
||||
4 12 356
|
||||
4 13 521
|
||||
4 14 165
|
||||
4 15 901
|
||||
4 16 248
|
||||
5 0 212
|
||||
5 1 209
|
||||
5 2 761
|
||||
5 3 870
|
||||
5 4 632
|
||||
5 6 629
|
||||
5 7 432
|
||||
5 8 876
|
||||
5 9 105
|
||||
5 10 797
|
||||
5 12 802
|
||||
5 13 889
|
||||
5 14 883
|
||||
5 15 740
|
||||
5 16 667
|
||||
6 0 734
|
||||
6 1 906
|
||||
6 2 19
|
||||
6 3 544
|
||||
6 4 29
|
||||
6 5 874
|
||||
6 7 411
|
||||
6 8 432
|
||||
6 9 713
|
||||
6 10 159
|
||||
6 11 672
|
||||
6 12 136
|
||||
6 13 210
|
||||
6 14 312
|
||||
6 15 98
|
||||
6 16 293
|
||||
7 0 496
|
||||
7 1 777
|
||||
7 2 965
|
||||
7 3 482
|
||||
7 4 930
|
||||
7 5 907
|
||||
7 6 684
|
||||
7 8 725
|
||||
7 9 217
|
||||
7 10 367
|
||||
7 11 813
|
||||
7 12 181
|
||||
7 13 77
|
||||
7 14 517
|
||||
7 15 83
|
||||
7 16 869
|
||||
8 0 517
|
||||
8 1 545
|
||||
8 2 724
|
||||
8 3 396
|
||||
8 4 749
|
||||
8 5 392
|
||||
8 6 84
|
||||
8 7 53
|
||||
8 9 376
|
||||
8 10 879
|
||||
8 11 714
|
||||
8 12 980
|
||||
8 13 637
|
||||
8 14 878
|
||||
8 15 294
|
||||
8 16 440
|
||||
9 0 657
|
||||
9 1 711
|
||||
9 2 619
|
||||
9 3 876
|
||||
9 4 454
|
||||
9 5 547
|
||||
9 6 458
|
||||
9 7 534
|
||||
9 8 78
|
||||
9 10 260
|
||||
9 11 715
|
||||
9 12 763
|
||||
9 13 936
|
||||
9 14 215
|
||||
9 15 73
|
||||
9 16 851
|
||||
10 0 710
|
||||
10 1 987
|
||||
10 2 842
|
||||
10 3 140
|
||||
10 4 75
|
||||
10 5 530
|
||||
10 6 250
|
||||
10 7 97
|
||||
10 8 758
|
||||
10 9 785
|
||||
10 11 455
|
||||
10 12 729
|
||||
10 13 905
|
||||
10 14 105
|
||||
10 15 339
|
||||
10 16 681
|
||||
11 0 44
|
||||
11 1 347
|
||||
11 2 639
|
||||
11 3 677
|
||||
11 4 347
|
||||
11 5 608
|
||||
11 6 542
|
||||
11 7 821
|
||||
11 8 630
|
||||
11 9 288
|
||||
11 10 372
|
||||
11 12 708
|
||||
11 13 623
|
||||
11 14 301
|
||||
11 15 391
|
||||
12 0 378
|
||||
12 1 775
|
||||
12 2 697
|
||||
12 3 482
|
||||
12 4 25
|
||||
12 5 516
|
||||
12 6 153
|
||||
12 7 290
|
||||
12 8 676
|
||||
12 9 19
|
||||
12 10 362
|
||||
12 11 988
|
||||
12 13 211
|
||||
12 14 992
|
||||
12 15 678
|
||||
12 16 629
|
||||
13 0 293
|
||||
13 1 536
|
||||
13 2 814
|
||||
13 3 99
|
||||
13 4 76
|
||||
13 5 757
|
||||
13 6 988
|
||||
13 7 328
|
||||
13 8 721
|
||||
13 9 220
|
||||
13 10 461
|
||||
13 11 163
|
||||
13 12 791
|
||||
13 14 704
|
||||
13 15 46
|
||||
13 16 958
|
||||
14 0 304
|
||||
14 1 781
|
||||
14 2 904
|
||||
14 3 5
|
||||
14 4 988
|
||||
14 5 491
|
||||
14 6 416
|
||||
14 7 362
|
||||
14 8 470
|
||||
14 9 569
|
||||
14 10 107
|
||||
14 11 444
|
||||
14 12 151
|
||||
14 13 719
|
||||
14 15 544
|
||||
14 16 893
|
||||
15 0 192
|
||||
15 1 777
|
||||
15 2 648
|
||||
15 3 428
|
||||
15 4 365
|
||||
15 5 156
|
||||
15 6 369
|
||||
15 7 489
|
||||
15 8 816
|
||||
15 9 994
|
||||
15 10 304
|
||||
15 11 130
|
||||
15 12 610
|
||||
15 13 430
|
||||
15 14 898
|
||||
15 16 828
|
||||
16 0 439
|
||||
16 1 802
|
||||
16 2 8
|
||||
16 3 502
|
||||
16 4 730
|
||||
16 5 816
|
||||
16 6 382
|
||||
16 7 648
|
||||
16 8 335
|
||||
16 9 300
|
||||
16 10 48
|
||||
16 11 813
|
||||
16 12 534
|
||||
16 13 34
|
||||
16 14 882
|
||||
16 15 878
|
||||
0 0
|
||||
1311
quase-menor-caminho/input/9
Normal file
1311
quase-menor-caminho/input/9
Normal file
File diff suppressed because it is too large
Load Diff
188
quase-menor-caminho/maratona.cls
Normal file
188
quase-menor-caminho/maratona.cls
Normal file
@@ -0,0 +1,188 @@
|
||||
\ProvidesPackage{maratona}
|
||||
\LoadClass[11pt]{article}
|
||||
|
||||
% remove page numbers
|
||||
\pagenumbering{gobble}
|
||||
|
||||
\RequirePackage{fancyhdr}
|
||||
|
||||
\RequirePackage{tabularx,colortbl}
|
||||
|
||||
%\RequirePackage{arial}
|
||||
\RequirePackage{ifpdf}
|
||||
\RequirePackage[T1]{fontenc}
|
||||
\RequirePackage[utf8]{inputenc}
|
||||
\RequirePackage[portuguese]{babel}
|
||||
\RequirePackage{graphics}
|
||||
\RequirePackage{graphicx}
|
||||
\RequirePackage{amssymb,amsmath,wrapfig}
|
||||
\RequirePackage{xcolor,colortbl}
|
||||
\RequirePackage{xcolor}
|
||||
\RequirePackage{ifthen}
|
||||
\oddsidemargin 0cm
|
||||
\evensidemargin -2cm
|
||||
\topmargin -1cm
|
||||
\textwidth 16cm
|
||||
\textheight 23cm
|
||||
|
||||
\ifpdf
|
||||
\RequirePackage[pdftex]{hyperref}
|
||||
\else
|
||||
\RequirePackage[hypertex]{hyperref}
|
||||
\fi
|
||||
|
||||
|
||||
\newcommand{\var}[1]{\ensuremath{{#1}}}
|
||||
|
||||
|
||||
\hypersetup{
|
||||
letterpaper,
|
||||
colorlinks=true,
|
||||
linkcolor=blue,
|
||||
urlcolor=blue,
|
||||
pdfpagemode=none,
|
||||
pdftitle={IV Maratona de Programação do IFB \today},
|
||||
pdfauthor={},
|
||||
pdfsubject={Caderno de problemas da IV Maratona de Programação do IFB },
|
||||
pdfkeywords={maratona, programação, IFB}
|
||||
}
|
||||
|
||||
|
||||
|
||||
\DeclareGraphicsExtensions{png}
|
||||
|
||||
\lhead{DS Contest Tools}
|
||||
\pagestyle{fancy}
|
||||
|
||||
% Capa
|
||||
\newenvironment{Maratona}[3]
|
||||
{
|
||||
\begin{titlepage}
|
||||
\begin{center}
|
||||
|
||||
\vspace{1cm}
|
||||
\Large{\textbf{#1}} \\
|
||||
\vspace{1cm}
|
||||
{\textbf{Caderno de Problemas}} \\
|
||||
\vspace{1cm}
|
||||
\begin{small}
|
||||
\textsl{#2}
|
||||
\end{small} \\
|
||||
\begin{figure}[htp]
|
||||
\begin{center}
|
||||
\includegraphics[scale=1]{logos/logo-maratona.png}
|
||||
\end{center}
|
||||
\end{figure}
|
||||
{(Este caderno contém {#3} problemas)} \\
|
||||
\vspace{1cm}
|
||||
}
|
||||
{
|
||||
\vfill
|
||||
\begin{small}
|
||||
{QNM 40, Área Especial nº 01,
|
||||
Taguatinga/DF, 72146-000 ,
|
||||
Brasil } \\
|
||||
{Telefone (61) 2103-2200 \\http://www.ifb.edu.br/taguatinga} \\
|
||||
\end{small}
|
||||
\end{center}
|
||||
\end{titlepage}
|
||||
}
|
||||
|
||||
\newcommand{\Organizacao}[2]{
|
||||
{\small \vfill
|
||||
\begin{center}
|
||||
|
||||
\textbf{Comissão Organizadora:} \\
|
||||
{#1} \\
|
||||
\bigskip
|
||||
\textbf{Apoio:}\\
|
||||
{#2}
|
||||
\end{center}
|
||||
}
|
||||
\vfill
|
||||
}
|
||||
|
||||
|
||||
% Problema
|
||||
\newcounter{problem}
|
||||
\newenvironment{Problema}[4]{
|
||||
\stepcounter{problem}
|
||||
\newpage
|
||||
\begin{center}
|
||||
\Large{\ifthenelse{\equal{#1}{}}{\textbf{{#2}}}{\textbf{Problema {#1} -- {#2} }}}{\\\footnotesize \textbf{Limite de tempo: {#3}s}}{\\[-0.1cm]\footnotesize \textbf{Limite de memória: {#4}MB}}
|
||||
\end{center}
|
||||
}
|
||||
|
||||
\newcounter{problemAutor}
|
||||
\newenvironment{ProblemaAutor}[5]{
|
||||
\stepcounter{problemAutor}
|
||||
\newpage
|
||||
\begin{center}
|
||||
\Large{\ifthenelse{\equal{#1}{}}{\textbf{{#2}}}{\textbf{Problema {#1} -- {#2} }}}{\\\footnotesize \textbf{Limite de tempo: {#3}s}}{\\[-0.1cm]\footnotesize \textbf{Limite de memória: {#4}MB\\}}{
|
||||
\footnotesize Autor: {#5}
|
||||
}
|
||||
\end{center}
|
||||
}
|
||||
|
||||
|
||||
% Código-fonte
|
||||
\newcommand{\codigofonte}[1]{Nome do arquivo fonte: {#1}}
|
||||
|
||||
% Entrada
|
||||
\newcommand{\Entrada}{
|
||||
\bigskip
|
||||
\begin{large}
|
||||
\textbf{Entrada} \\
|
||||
\end{large}
|
||||
}
|
||||
|
||||
% Saida
|
||||
\newcommand{\Saida}{
|
||||
\bigskip
|
||||
\begin{large}
|
||||
\textbf{Saída} \\
|
||||
\end{large}
|
||||
}
|
||||
|
||||
\newcommand{\Interacao}{
|
||||
\bigskip
|
||||
\begin{large}
|
||||
\textbf{Interação} \\
|
||||
\end{large}
|
||||
}
|
||||
|
||||
\newcommand{\Notas}{
|
||||
\bigskip
|
||||
\begin{large}
|
||||
\textbf{Notas} \\
|
||||
\end{large}
|
||||
}
|
||||
|
||||
% Exemplo
|
||||
\newenvironment{Exemplo}
|
||||
{
|
||||
|
||||
\tabularx{\textwidth}{XX}
|
||||
% {@{\extracolsep{\fill}}|l|l|}
|
||||
% {|l|l@{\extracolsep{\fill}|}}
|
||||
\hline
|
||||
Entrada & Saída \\\hline
|
||||
}
|
||||
{
|
||||
\hline
|
||||
\endtabularx
|
||||
}
|
||||
|
||||
% Exemplo de Entrada
|
||||
\newenvironment{ExemploEntrada}
|
||||
{
|
||||
\bigskip
|
||||
\begin{large}
|
||||
\textbf{Exemplo} \\
|
||||
\end{large}
|
||||
}
|
||||
{
|
||||
}
|
||||
|
||||
% Sample Output
|
||||
|
||||
3
quase-menor-caminho/output/1
Normal file
3
quase-menor-caminho/output/1
Normal file
@@ -0,0 +1,3 @@
|
||||
5
|
||||
-1
|
||||
6
|
||||
4
quase-menor-caminho/output/10
Normal file
4
quase-menor-caminho/output/10
Normal file
@@ -0,0 +1,4 @@
|
||||
-1
|
||||
32
|
||||
32
|
||||
8
|
||||
5
quase-menor-caminho/output/11
Normal file
5
quase-menor-caminho/output/11
Normal file
@@ -0,0 +1,5 @@
|
||||
505
|
||||
637
|
||||
41
|
||||
8
|
||||
-1
|
||||
2
quase-menor-caminho/output/12
Normal file
2
quase-menor-caminho/output/12
Normal file
@@ -0,0 +1,2 @@
|
||||
-1
|
||||
8
|
||||
7
quase-menor-caminho/output/13
Normal file
7
quase-menor-caminho/output/13
Normal file
@@ -0,0 +1,7 @@
|
||||
23
|
||||
-1
|
||||
39
|
||||
8
|
||||
40
|
||||
60
|
||||
-1
|
||||
5
quase-menor-caminho/output/14
Normal file
5
quase-menor-caminho/output/14
Normal file
@@ -0,0 +1,5 @@
|
||||
7
|
||||
14
|
||||
39
|
||||
-1
|
||||
-1
|
||||
1
quase-menor-caminho/output/15
Normal file
1
quase-menor-caminho/output/15
Normal file
@@ -0,0 +1 @@
|
||||
-1
|
||||
3
quase-menor-caminho/output/16
Normal file
3
quase-menor-caminho/output/16
Normal file
@@ -0,0 +1,3 @@
|
||||
25
|
||||
30
|
||||
8
|
||||
3
quase-menor-caminho/output/17
Normal file
3
quase-menor-caminho/output/17
Normal file
@@ -0,0 +1,3 @@
|
||||
25
|
||||
52
|
||||
181
|
||||
3
quase-menor-caminho/output/18
Normal file
3
quase-menor-caminho/output/18
Normal file
@@ -0,0 +1,3 @@
|
||||
8
|
||||
8
|
||||
-1
|
||||
4
quase-menor-caminho/output/19
Normal file
4
quase-menor-caminho/output/19
Normal file
@@ -0,0 +1,4 @@
|
||||
-1
|
||||
53
|
||||
121
|
||||
109
|
||||
3
quase-menor-caminho/output/2
Normal file
3
quase-menor-caminho/output/2
Normal file
@@ -0,0 +1,3 @@
|
||||
-1
|
||||
3
|
||||
-1
|
||||
2
quase-menor-caminho/output/20
Normal file
2
quase-menor-caminho/output/20
Normal file
@@ -0,0 +1,2 @@
|
||||
8
|
||||
-1
|
||||
3
quase-menor-caminho/output/21
Normal file
3
quase-menor-caminho/output/21
Normal file
@@ -0,0 +1,3 @@
|
||||
8
|
||||
31
|
||||
72
|
||||
1
quase-menor-caminho/output/22
Normal file
1
quase-menor-caminho/output/22
Normal file
@@ -0,0 +1 @@
|
||||
46
|
||||
2
quase-menor-caminho/output/23
Normal file
2
quase-menor-caminho/output/23
Normal file
@@ -0,0 +1,2 @@
|
||||
13
|
||||
67
|
||||
1
quase-menor-caminho/output/24
Normal file
1
quase-menor-caminho/output/24
Normal file
@@ -0,0 +1 @@
|
||||
-1
|
||||
2
quase-menor-caminho/output/25
Normal file
2
quase-menor-caminho/output/25
Normal file
@@ -0,0 +1,2 @@
|
||||
258
|
||||
-1
|
||||
1
quase-menor-caminho/output/26
Normal file
1
quase-menor-caminho/output/26
Normal file
@@ -0,0 +1 @@
|
||||
22
|
||||
3
quase-menor-caminho/output/27
Normal file
3
quase-menor-caminho/output/27
Normal file
@@ -0,0 +1,3 @@
|
||||
-1
|
||||
210
|
||||
-1
|
||||
3
quase-menor-caminho/output/28
Normal file
3
quase-menor-caminho/output/28
Normal file
@@ -0,0 +1,3 @@
|
||||
133
|
||||
-1
|
||||
8
|
||||
2
quase-menor-caminho/output/29
Normal file
2
quase-menor-caminho/output/29
Normal file
@@ -0,0 +1,2 @@
|
||||
8
|
||||
81
|
||||
3
quase-menor-caminho/output/3
Normal file
3
quase-menor-caminho/output/3
Normal file
@@ -0,0 +1,3 @@
|
||||
8
|
||||
-1
|
||||
15
|
||||
2
quase-menor-caminho/output/30
Normal file
2
quase-menor-caminho/output/30
Normal file
@@ -0,0 +1,2 @@
|
||||
8
|
||||
40
|
||||
1
quase-menor-caminho/output/31
Normal file
1
quase-menor-caminho/output/31
Normal file
@@ -0,0 +1 @@
|
||||
267
|
||||
2
quase-menor-caminho/output/32
Normal file
2
quase-menor-caminho/output/32
Normal file
@@ -0,0 +1,2 @@
|
||||
210
|
||||
8
|
||||
4
quase-menor-caminho/output/33
Normal file
4
quase-menor-caminho/output/33
Normal file
@@ -0,0 +1,4 @@
|
||||
262
|
||||
252
|
||||
8
|
||||
31
|
||||
3
quase-menor-caminho/output/34
Normal file
3
quase-menor-caminho/output/34
Normal file
@@ -0,0 +1,3 @@
|
||||
201
|
||||
8
|
||||
276
|
||||
3
quase-menor-caminho/output/35
Normal file
3
quase-menor-caminho/output/35
Normal file
@@ -0,0 +1,3 @@
|
||||
38
|
||||
412
|
||||
160
|
||||
4
quase-menor-caminho/output/36
Normal file
4
quase-menor-caminho/output/36
Normal file
@@ -0,0 +1,4 @@
|
||||
227
|
||||
64
|
||||
8
|
||||
289
|
||||
1
quase-menor-caminho/output/37
Normal file
1
quase-menor-caminho/output/37
Normal file
@@ -0,0 +1 @@
|
||||
268
|
||||
4
quase-menor-caminho/output/38
Normal file
4
quase-menor-caminho/output/38
Normal file
@@ -0,0 +1,4 @@
|
||||
527
|
||||
427
|
||||
124
|
||||
-1
|
||||
4
quase-menor-caminho/output/39
Normal file
4
quase-menor-caminho/output/39
Normal file
@@ -0,0 +1,4 @@
|
||||
-1
|
||||
69
|
||||
90
|
||||
-1
|
||||
2
quase-menor-caminho/output/4
Normal file
2
quase-menor-caminho/output/4
Normal file
@@ -0,0 +1,2 @@
|
||||
5
|
||||
7
|
||||
1
quase-menor-caminho/output/40
Normal file
1
quase-menor-caminho/output/40
Normal file
@@ -0,0 +1 @@
|
||||
190
|
||||
1
quase-menor-caminho/output/41
Normal file
1
quase-menor-caminho/output/41
Normal file
@@ -0,0 +1 @@
|
||||
8
|
||||
1
quase-menor-caminho/output/42
Normal file
1
quase-menor-caminho/output/42
Normal file
@@ -0,0 +1 @@
|
||||
-1
|
||||
100
quase-menor-caminho/output/43
Normal file
100
quase-menor-caminho/output/43
Normal file
@@ -0,0 +1,100 @@
|
||||
883
|
||||
313
|
||||
1471
|
||||
1014
|
||||
-1
|
||||
-1
|
||||
-1
|
||||
711
|
||||
-1
|
||||
-1
|
||||
-1
|
||||
714
|
||||
4010
|
||||
-1
|
||||
-1
|
||||
-1
|
||||
-1
|
||||
-1
|
||||
-1
|
||||
-1
|
||||
518
|
||||
249
|
||||
-1
|
||||
-1
|
||||
385
|
||||
-1
|
||||
-1
|
||||
-1
|
||||
-1
|
||||
1132
|
||||
-1
|
||||
211
|
||||
1614
|
||||
-1
|
||||
130
|
||||
-1
|
||||
-1
|
||||
-1
|
||||
-1
|
||||
137
|
||||
-1
|
||||
1337
|
||||
-1
|
||||
271
|
||||
-1
|
||||
-1
|
||||
390
|
||||
-1
|
||||
320
|
||||
-1
|
||||
-1
|
||||
1166
|
||||
-1
|
||||
792
|
||||
-1
|
||||
-1
|
||||
-1
|
||||
228
|
||||
-1
|
||||
61
|
||||
1220
|
||||
480
|
||||
458
|
||||
38
|
||||
-1
|
||||
-1
|
||||
-1
|
||||
2407
|
||||
-1
|
||||
585
|
||||
-1
|
||||
-1
|
||||
1872
|
||||
165
|
||||
-1
|
||||
949
|
||||
455
|
||||
406
|
||||
867
|
||||
1618
|
||||
1127
|
||||
398
|
||||
-1
|
||||
1143
|
||||
49
|
||||
2375
|
||||
-1
|
||||
588
|
||||
-1
|
||||
437
|
||||
1065
|
||||
-1
|
||||
-1
|
||||
-1
|
||||
1939
|
||||
790
|
||||
1506
|
||||
-1
|
||||
-1
|
||||
840
|
||||
3
quase-menor-caminho/output/5
Normal file
3
quase-menor-caminho/output/5
Normal file
@@ -0,0 +1,3 @@
|
||||
153
|
||||
41
|
||||
112
|
||||
1
quase-menor-caminho/output/6
Normal file
1
quase-menor-caminho/output/6
Normal file
@@ -0,0 +1 @@
|
||||
173
|
||||
4
quase-menor-caminho/output/7
Normal file
4
quase-menor-caminho/output/7
Normal file
@@ -0,0 +1,4 @@
|
||||
16
|
||||
8
|
||||
27
|
||||
33
|
||||
3
quase-menor-caminho/output/8
Normal file
3
quase-menor-caminho/output/8
Normal file
@@ -0,0 +1,3 @@
|
||||
8
|
||||
8
|
||||
8
|
||||
5
quase-menor-caminho/output/9
Normal file
5
quase-menor-caminho/output/9
Normal file
@@ -0,0 +1,5 @@
|
||||
250
|
||||
8
|
||||
-1
|
||||
158
|
||||
-1
|
||||
64
quase-menor-caminho/problem.json
Normal file
64
quase-menor-caminho/problem.json
Normal file
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"version": "1.0",
|
||||
"problem": {
|
||||
"title": "Quase Menor Caminho",
|
||||
"event": "South American Regional Contests 2008",
|
||||
"time_limit": 1.0,
|
||||
"memory_limit_mb": 1536,
|
||||
"input_file": "stdin",
|
||||
"output_file": "stdout",
|
||||
"interactive": false,
|
||||
"grader": false,
|
||||
"subject": {
|
||||
"en_us": [
|
||||
"graphs", "dijkstra", "shortest-path", "directed-graph"
|
||||
],
|
||||
"pt_br": [
|
||||
"grafos", "dijkstra", "menor-caminho", "grafo-direcionado"
|
||||
],
|
||||
"es": [
|
||||
""
|
||||
]
|
||||
}
|
||||
},
|
||||
"author": {
|
||||
"name": "SPOJ Brasil",
|
||||
"affiliation": "South American Regional Contests 2008",
|
||||
"country": "BR",
|
||||
"email": ""
|
||||
},
|
||||
"build": {
|
||||
"run_generator": true,
|
||||
"run_validator": true,
|
||||
"produce_outputs": true,
|
||||
"run_checker": true,
|
||||
"run_all_solutions": true,
|
||||
"run_specific_solution": "",
|
||||
"generate_io_only": false,
|
||||
"generate_pdf_only": false,
|
||||
"cpu_count": 1,
|
||||
"build_pdf": true,
|
||||
"pdf_format": "ds",
|
||||
"io_samples": 1
|
||||
},
|
||||
"solutions": {
|
||||
"main-ac": "ac.cpp",
|
||||
"alternative-ac": ["alternative_ac.py"],
|
||||
"wrong-answer": [],
|
||||
"time-limit": [],
|
||||
"time-limit-or-ac": [],
|
||||
"time-limit-or-memory-limit": [],
|
||||
"memory-limit": [],
|
||||
"presentation-error": [],
|
||||
"runtime-error": []
|
||||
},
|
||||
"polygon_config": {
|
||||
"id": ""
|
||||
},
|
||||
"boca_config": {
|
||||
"time_limit": 1,
|
||||
"number_of_repetitions": 1,
|
||||
"maximum_memory_mb": 1536,
|
||||
"maximum_output_size_kb": 24096
|
||||
}
|
||||
}
|
||||
BIN
quase-menor-caminho/quase-menor-caminho-tutorial.pdf
Normal file
BIN
quase-menor-caminho/quase-menor-caminho-tutorial.pdf
Normal file
Binary file not shown.
44
quase-menor-caminho/quase-menor-caminho-tutorial.tex
Normal file
44
quase-menor-caminho/quase-menor-caminho-tutorial.tex
Normal file
@@ -0,0 +1,44 @@
|
||||
\documentclass[10pt]{article}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage{amsmath,amsthm,amssymb}
|
||||
\usepackage{fullpage}
|
||||
\usepackage{url}
|
||||
\pagenumbering{gobble}
|
||||
\usepackage{hyperref}
|
||||
|
||||
\title{ Tutorial: Quase Menor Caminho}
|
||||
\author{SPOJ Brasil}
|
||||
\date{}
|
||||
\begin{document}
|
||||
\maketitle
|
||||
Uma forma direta de resolver o problema e remover todas as arestas que pertencem
|
||||
a algum menor caminho original e, depois, calcular novamente o menor caminho.
|
||||
|
||||
Primeiro rodamos Dijkstra a partir de $S$ no grafo original, obtendo
|
||||
$distS[u]$, a menor distancia de $S$ ate cada vertice $u$. Em seguida rodamos
|
||||
Dijkstra no grafo reverso a partir de $D$, obtendo $distD[u]$, a menor
|
||||
distancia de $u$ ate $D$ no grafo original.
|
||||
|
||||
Se $distS[D]$ for infinito, nao existe caminho de $S$ ate $D$ e a resposta ja e
|
||||
$-1$.
|
||||
|
||||
Caso contrario, uma aresta direcionada $(u, v)$ de peso $p$ pertence a algum
|
||||
menor caminho de $S$ ate $D$ se, e somente se:
|
||||
|
||||
\[
|
||||
distS[u] + p + distD[v] = distS[D].
|
||||
\]
|
||||
|
||||
Essa igualdade diz que existe um menor caminho formado por um menor caminho de
|
||||
$S$ ate $u$, seguido pela aresta $(u, v)$, seguido por um menor caminho de $v$
|
||||
ate $D$. Portanto, marcamos todas as arestas que satisfazem essa condicao como
|
||||
removidas.
|
||||
|
||||
Por fim, rodamos Dijkstra mais uma vez a partir de $S$, ignorando as arestas
|
||||
removidas. A distancia obtida ate $D$ e o quase menor caminho; se ela for
|
||||
infinita, imprimimos $-1$.
|
||||
|
||||
Cada execucao de Dijkstra custa $O((N+M)\log N)$. Como usamos tres execucoes, a
|
||||
complexidade total por caso de teste e $O((N+M)\log N)$ em tempo e $O(N+M)$ em
|
||||
memoria.
|
||||
\end{document}
|
||||
BIN
quase-menor-caminho/quase-menor-caminho.pdf
Normal file
BIN
quase-menor-caminho/quase-menor-caminho.pdf
Normal file
Binary file not shown.
115
quase-menor-caminho/quase-menor-caminho.tex
Normal file
115
quase-menor-caminho/quase-menor-caminho.tex
Normal file
@@ -0,0 +1,115 @@
|
||||
\documentclass{maratona}
|
||||
|
||||
\begin{document}
|
||||
\begin{ProblemaAutor}{}{Quase Menor Caminho}{1}{1536}{SPOJ Brasil}
|
||||
|
||||
Encontrar o menor caminho entre dois pontos em um mapa é um problema clássico.
|
||||
Mas, em alguns sistemas de navegação, todas as rotas que fazem parte de algum
|
||||
menor caminho podem ficar congestionadas. Nesse caso, queremos encontrar uma rota
|
||||
alternativa.
|
||||
|
||||
O mapa é representado por um grafo direcionado e ponderado. Os vértices são
|
||||
pontos do mapa, e cada aresta direcionada representa uma rota de um ponto para
|
||||
outro com um certo comprimento.
|
||||
|
||||
O quase menor caminho entre a origem $S$ e o destino $D$ é o menor caminho de
|
||||
$S$ até $D$ que não usa nenhuma aresta pertencente a qualquer menor caminho de
|
||||
$S$ até $D$ no grafo original.
|
||||
|
||||
Sua tarefa é determinar o comprimento do quase menor caminho. Caso não exista
|
||||
nenhum caminho que satisfaça essa condição, a resposta deve ser $-1$.
|
||||
|
||||
Por exemplo, suponha que a figura abaixo representa o mapa dado, com círculos
|
||||
representando localizações e linhas representando rotas diretas, de mão única
|
||||
com as distâncias indicadas. O ponto de partida está marcado como $S$ e o de
|
||||
destino está marcado como $D$. As linhas em negrito pertencem a um caminho
|
||||
mínimo (nesse caso existem dois caminhos mínimos, cada um com extensão \(4\)).
|
||||
Logo, o quase menor caminho seria o indicado com linhas pontilhadas (extensão
|
||||
\(5\)), já que nenhuma rota entre dois pontos consecutivos pertence a nenhum
|
||||
caminho mínimo. Note que poderia existir mais de uma resposta possível, por
|
||||
exemplo, se a rota com extensão \(3\) tivesse extensão \(1\). Bem como poderia
|
||||
inexistir uma resposta certa.
|
||||
|
||||
\begin{figure}[h]
|
||||
\centering
|
||||
\includegraphics[width=0.3\textwidth]{image.png}
|
||||
\end{figure}
|
||||
|
||||
\Entrada
|
||||
|
||||
A entrada contem varios casos de teste.
|
||||
|
||||
A primeira linha de cada caso contem dois inteiros $N$ e $M$
|
||||
($2 \leq N \leq 500$, $1 \leq M \leq 10^4$), representando o numero de
|
||||
vertices e o numero de arestas direcionadas do grafo. Os vertices sao numerados
|
||||
de $0$ a $N-1$.
|
||||
|
||||
A segunda linha contem dois inteiros $S$ e $D$
|
||||
($0 \leq S, D < N$, $S \neq D$), representando a origem e o destino.
|
||||
|
||||
Cada uma das proximas $M$ linhas contem tres inteiros $U$, $V$ e $P$
|
||||
($U \neq V$, $0 \leq U, V < N$, $1 \leq P \leq 1000$), indicando uma aresta
|
||||
direcionada de $U$ para $V$ com peso $P$.
|
||||
|
||||
Existe no maximo uma aresta direcionada de um vertice $U$ para um vertice $V$.
|
||||
A existencia de uma aresta de $U$ para $V$ nao implica a existencia de uma aresta
|
||||
de $V$ para $U$.
|
||||
|
||||
O fim da entrada e indicado por uma linha contendo \texttt{0 0}.
|
||||
|
||||
\Saida
|
||||
|
||||
Para cada caso de teste, imprima uma linha contendo um unico inteiro.
|
||||
|
||||
Se existir um quase menor caminho, imprima seu comprimento. Caso contrario,
|
||||
imprima $-1$.
|
||||
|
||||
\ExemploEntrada
|
||||
\begin{Exemplo}
|
||||
\texttt{7~9} & \texttt{5}\\
|
||||
\texttt{0~6} & \texttt{-1}\\
|
||||
\texttt{0~1~1} & \texttt{6}\\
|
||||
\texttt{0~2~1} & \\
|
||||
\texttt{0~3~2} & \\
|
||||
\texttt{0~4~3} & \\
|
||||
\texttt{1~5~2} & \\
|
||||
\texttt{2~6~4} & \\
|
||||
\texttt{3~6~2} & \\
|
||||
\texttt{4~6~4} & \\
|
||||
\texttt{5~6~1} & \\
|
||||
\texttt{4~6} & \\
|
||||
\texttt{0~2} & \\
|
||||
\texttt{0~1~1} & \\
|
||||
\texttt{1~2~1} & \\
|
||||
\texttt{1~3~1} & \\
|
||||
\texttt{3~2~1} & \\
|
||||
\texttt{2~0~3} & \\
|
||||
\texttt{3~0~2} & \\
|
||||
\texttt{6~8} & \\
|
||||
\texttt{0~1} & \\
|
||||
\texttt{0~1~1} & \\
|
||||
\texttt{0~2~2} & \\
|
||||
\texttt{0~3~3} & \\
|
||||
\texttt{2~5~3} & \\
|
||||
\texttt{3~4~2} & \\
|
||||
\texttt{4~1~1} & \\
|
||||
\texttt{5~1~1} & \\
|
||||
\texttt{3~0~1} & \\
|
||||
\texttt{0~0} & \\
|
||||
\end{Exemplo}
|
||||
|
||||
|
||||
|
||||
\Notas
|
||||
|
||||
No primeiro caso da amostra, existem menores caminhos de custo $4$. Todas as
|
||||
arestas que aparecem em algum desses caminhos sao descartadas. Depois disso, o
|
||||
menor caminho restante tem custo $5$.
|
||||
|
||||
No segundo caso, todo caminho da origem ate o destino usa alguma aresta que
|
||||
pertence a um menor caminho original, entao a resposta e $-1$.
|
||||
|
||||
Problema adaptado do SPOJ Brasil:
|
||||
\href{https://br.spoj.com/problems/QUASEMEN/}{QUASEMEN - Quase Menor Caminho}.
|
||||
\end{ProblemaAutor}
|
||||
\end{document}
|
||||
70
quase-menor-caminho/src/ac.cpp
Normal file
70
quase-menor-caminho/src/ac.cpp
Normal file
@@ -0,0 +1,70 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
#define INF 0x7FFFFFFF
|
||||
using namespace std;
|
||||
|
||||
using ll = long long;
|
||||
using pll = pair<ll, ll>;
|
||||
using graph = vector<vector<pll>>;
|
||||
const int MAXN = 510;
|
||||
|
||||
vector<ll> dijk(int x, graph& g) {
|
||||
priority_queue<pll> pq;
|
||||
pq.push({0, x});
|
||||
vector<ll> dist(MAXN, INF);
|
||||
while (pq.size()){
|
||||
auto [w, v] = pq.top();
|
||||
pq.pop();
|
||||
w = -w;
|
||||
if (dist[v] <= w) continue;
|
||||
dist[v] = w;
|
||||
for (auto [u, ww] : g[v]) {
|
||||
if (dist[u] <= w + ww) continue;
|
||||
pq.push({-(w+ww), u});
|
||||
}
|
||||
}
|
||||
return dist;
|
||||
}
|
||||
|
||||
ll almost_dijk(int s, int d, graph& g, vector<ll>& dist_s, vector<ll>& dist_d) {
|
||||
ll best = dist_s[d];
|
||||
if (best == INF) return -1;
|
||||
|
||||
priority_queue<pll> pq;
|
||||
pq.push({0, s});
|
||||
vector<ll> dist(MAXN, INF);
|
||||
while (pq.size()){
|
||||
auto [w, v] = pq.top();
|
||||
pq.pop();
|
||||
w = -w;
|
||||
if (v == d) return w;
|
||||
if (dist[v] <= w) continue;
|
||||
dist[v] = w;
|
||||
for (auto [u, ww] : g[v]) {
|
||||
if (dist_s[v] + ww + dist_d[u] <= best) continue; // pula essa aresta, corresponde a um caminho minimo
|
||||
if (dist[u] <= w + ww) continue;
|
||||
pq.push({-(w+ww), u});
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
int main(){
|
||||
ios::sync_with_stdio(0);
|
||||
cin.tie(0); cout.tie(0);
|
||||
|
||||
int n, m;
|
||||
while (cin>>n>>m, n!=0 && m!=0){
|
||||
int s, d; cin >> s >> d;
|
||||
vector<vector<pll>> g(MAXN);
|
||||
vector<vector<pll>> g_rev(MAXN);
|
||||
for (int i=0;i<m;i++){
|
||||
int u,v,p; cin >> u >> v >> p;
|
||||
g[u].push_back({v, p});
|
||||
g_rev[v].push_back({u, p});
|
||||
}
|
||||
vector<ll> dist_s = dijk(s, g);
|
||||
vector<ll> dist_d = dijk(d, g_rev);
|
||||
cout << almost_dijk(s, d, g, dist_s, dist_d) << '\n';
|
||||
}
|
||||
}
|
||||
84
quase-menor-caminho/src/alternative_ac.py
Normal file
84
quase-menor-caminho/src/alternative_ac.py
Normal file
@@ -0,0 +1,84 @@
|
||||
import heapq
|
||||
import sys
|
||||
|
||||
|
||||
INF = 10**30
|
||||
|
||||
|
||||
def dijkstra(start, graph, edges, removed):
|
||||
dist = [INF] * len(graph)
|
||||
dist[start] = 0
|
||||
pq = [(0, start)]
|
||||
|
||||
while pq:
|
||||
cur_dist, u = heapq.heappop(pq)
|
||||
if cur_dist != dist[u]:
|
||||
continue
|
||||
|
||||
for edge_id in graph[u]:
|
||||
if removed[edge_id]:
|
||||
continue
|
||||
_, v, weight = edges[edge_id]
|
||||
new_dist = cur_dist + weight
|
||||
if new_dist < dist[v]:
|
||||
dist[v] = new_dist
|
||||
heapq.heappush(pq, (new_dist, v))
|
||||
|
||||
return dist
|
||||
|
||||
|
||||
def solve(data):
|
||||
it = iter(map(int, data.split()))
|
||||
answers = []
|
||||
|
||||
while True:
|
||||
n = next(it)
|
||||
m = next(it)
|
||||
if n == 0 and m == 0:
|
||||
break
|
||||
|
||||
source = next(it)
|
||||
target = next(it)
|
||||
|
||||
edges = []
|
||||
graph = [[] for _ in range(n)]
|
||||
reverse_graph = [[] for _ in range(n)]
|
||||
|
||||
for edge_id in range(m):
|
||||
u = next(it)
|
||||
v = next(it)
|
||||
weight = next(it)
|
||||
edges.append((u, v, weight))
|
||||
graph[u].append(edge_id)
|
||||
reverse_graph[v].append(edge_id)
|
||||
|
||||
removed = [False] * m
|
||||
from_source = dijkstra(source, graph, edges, removed)
|
||||
if from_source[target] == INF:
|
||||
answers.append("-1")
|
||||
continue
|
||||
|
||||
reverse_edges = [(v, u, w) for u, v, w in edges]
|
||||
to_target = dijkstra(target, reverse_graph, reverse_edges, removed)
|
||||
shortest = from_source[target]
|
||||
|
||||
for edge_id, (u, v, weight) in enumerate(edges):
|
||||
if from_source[u] == INF or to_target[v] == INF:
|
||||
continue
|
||||
if from_source[u] + weight + to_target[v] == shortest:
|
||||
removed[edge_id] = True
|
||||
|
||||
almost = dijkstra(source, graph, edges, removed)
|
||||
answers.append(str(-1 if almost[target] == INF else almost[target]))
|
||||
|
||||
return "\n".join(answers)
|
||||
|
||||
|
||||
def main():
|
||||
output = solve(sys.stdin.read())
|
||||
if output:
|
||||
sys.stdout.write(output + "\n")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
39
quase-menor-caminho/src/checker.cpp
Normal file
39
quase-menor-caminho/src/checker.cpp
Normal file
@@ -0,0 +1,39 @@
|
||||
#include "testlib.h"
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
setName("compare almost shortest path length");
|
||||
registerTestlibCmd(argc, argv);
|
||||
|
||||
int cases = 0;
|
||||
while (true) {
|
||||
int n = inf.readInt();
|
||||
int m = inf.readInt();
|
||||
if (n == 0 && m == 0) break;
|
||||
|
||||
cases++;
|
||||
inf.readInt();
|
||||
inf.readInt();
|
||||
for (int i = 0; i < m; i++) {
|
||||
inf.readInt();
|
||||
inf.readInt();
|
||||
inf.readInt();
|
||||
}
|
||||
|
||||
int expected = ans.readInt(-1, 1000000000, "expected_answer");
|
||||
int found = ouf.readInt(-1, 1000000000, "participant_answer");
|
||||
|
||||
if (expected != found)
|
||||
quitf(_wa, "case %d: expected %d, found %d", cases, expected, found);
|
||||
}
|
||||
|
||||
if (!ouf.seekEof())
|
||||
quitf(_wa, "extra output after case %d", cases);
|
||||
|
||||
quitf(_ok, "all %d cases are correct", cases);
|
||||
return 0;
|
||||
}
|
||||
306
quase-menor-caminho/src/generator.cpp
Normal file
306
quase-menor-caminho/src/generator.cpp
Normal file
@@ -0,0 +1,306 @@
|
||||
#include "jngen.h"
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
const int MAX_N = 500;
|
||||
const int MAX_M = 10000;
|
||||
const int MAX_W = 1000;
|
||||
const int RANDOM_FILES = 35;
|
||||
|
||||
struct Edge {
|
||||
int u;
|
||||
int v;
|
||||
int w;
|
||||
};
|
||||
|
||||
struct Case {
|
||||
int n;
|
||||
int source;
|
||||
int target;
|
||||
vector<Edge> edges;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
void append(vector<T>& dest, const vector<T>& orig) {
|
||||
dest.insert(dest.end(), orig.begin(), orig.end());
|
||||
}
|
||||
|
||||
string render_file(const vector<Case>& cases) {
|
||||
ostringstream oss;
|
||||
for (const Case& tc : cases) {
|
||||
oss << tc.n << " " << tc.edges.size() << "\n";
|
||||
oss << tc.source << " " << tc.target << "\n";
|
||||
for (const Edge& e : tc.edges) {
|
||||
oss << e.u << " " << e.v << " " << e.w << "\n";
|
||||
}
|
||||
}
|
||||
oss << "0 0\n";
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
void add_edge(vector<Edge>& edges, set<pair<int, int>>& used, int u, int v, int w) {
|
||||
if (u == v) return;
|
||||
if (!used.insert({u, v}).second) return;
|
||||
edges.push_back({u, v, w});
|
||||
}
|
||||
|
||||
Case make_case(int n, int source, int target, vector<Edge> edges) {
|
||||
return {n, source, target, edges};
|
||||
}
|
||||
|
||||
Case make_layered_case(int n, int extra_edges) {
|
||||
int source = 0;
|
||||
int target = n - 1;
|
||||
vector<Edge> edges;
|
||||
set<pair<int, int>> used;
|
||||
|
||||
int a = 1;
|
||||
int b = max(2, n / 3);
|
||||
int c = max(b + 1, 2 * n / 3);
|
||||
if (c >= target) c = target - 1;
|
||||
|
||||
add_edge(edges, used, source, a, 1);
|
||||
add_edge(edges, used, source, b, 1);
|
||||
add_edge(edges, used, a, c, 2);
|
||||
add_edge(edges, used, b, c, 2);
|
||||
add_edge(edges, used, c, target, 2);
|
||||
add_edge(edges, used, source, target, 8);
|
||||
add_edge(edges, used, source, c, 6);
|
||||
add_edge(edges, used, a, target, 7);
|
||||
|
||||
Graph g = Graph::random(n, min(extra_edges, n * (n - 1))).directed().allowAntiparallel();
|
||||
for (auto p : g.edges()) {
|
||||
add_edge(edges, used, p.first, p.second, rnd.next(4, MAX_W));
|
||||
if ((int)edges.size() >= MAX_M) break;
|
||||
}
|
||||
|
||||
return make_case(n, source, target, edges);
|
||||
}
|
||||
|
||||
Case make_no_path_case(int n, int extra_edges) {
|
||||
int source = 0;
|
||||
int target = n - 1;
|
||||
vector<Edge> edges;
|
||||
set<pair<int, int>> used;
|
||||
|
||||
int split = max(1, n / 2);
|
||||
for (int i = 0; i < extra_edges; i++) {
|
||||
int u, v;
|
||||
if (rnd.next(0, 1)) {
|
||||
u = rnd.next(0, split - 1);
|
||||
v = rnd.next(0, split - 1);
|
||||
} else {
|
||||
u = rnd.next(split, n - 1);
|
||||
v = rnd.next(split, n - 1);
|
||||
}
|
||||
add_edge(edges, used, u, v, rnd.next(1, MAX_W));
|
||||
}
|
||||
|
||||
if (edges.empty()) add_edge(edges, used, source, min(1, n - 1), 1);
|
||||
return make_case(n, source, target, edges);
|
||||
}
|
||||
|
||||
Case make_unique_second_case(int n) {
|
||||
int source = 0;
|
||||
int target = n - 1;
|
||||
vector<Edge> edges;
|
||||
set<pair<int, int>> used;
|
||||
|
||||
for (int i = 0; i + 1 < n; i++) {
|
||||
add_edge(edges, used, i, i + 1, 1);
|
||||
}
|
||||
add_edge(edges, used, source, target, n + 3);
|
||||
if (n > 3) {
|
||||
add_edge(edges, used, source, 2, 3);
|
||||
add_edge(edges, used, 2, target, n);
|
||||
}
|
||||
|
||||
return make_case(n, source, target, edges);
|
||||
}
|
||||
|
||||
Case make_random_case(int n, int m) {
|
||||
int source = rnd.next(0, n - 1);
|
||||
int target = rnd.next(0, n - 2);
|
||||
if (target >= source) target++;
|
||||
|
||||
vector<Edge> edges;
|
||||
set<pair<int, int>> used;
|
||||
|
||||
int chain_len = rnd.next(2, min(n, 20));
|
||||
vector<int> vertices = {source};
|
||||
vector<int> pool;
|
||||
for (int v = 0; v < n; v++) {
|
||||
if (v != source && v != target) pool.push_back(v);
|
||||
}
|
||||
shuffle(pool.begin(), pool.end());
|
||||
for (int i = 0; i < chain_len - 2 && i < (int)pool.size(); i++) {
|
||||
vertices.push_back(pool[i]);
|
||||
}
|
||||
vertices.push_back(target);
|
||||
|
||||
for (int i = 0; i + 1 < (int)vertices.size(); i++) {
|
||||
add_edge(edges, used, vertices[i], vertices[i + 1], rnd.next(1, 20));
|
||||
}
|
||||
|
||||
Graph g = Graph::random(n, min(m, n * (n - 1))).directed().allowAntiparallel();
|
||||
for (auto p : g.edges()) {
|
||||
add_edge(edges, used, p.first, p.second, rnd.next(1, MAX_W));
|
||||
if ((int)edges.size() >= m) break;
|
||||
}
|
||||
|
||||
while ((int)edges.size() < m) {
|
||||
int u = rnd.next(0, n - 1);
|
||||
int v = rnd.next(0, n - 1);
|
||||
add_edge(edges, used, u, v, rnd.next(1, MAX_W));
|
||||
}
|
||||
|
||||
return make_case(n, source, target, edges);
|
||||
}
|
||||
|
||||
vector<string> generate_sample_tests() {
|
||||
vector<string> tests;
|
||||
|
||||
tests.push_back(
|
||||
"7 9\n"
|
||||
"0 6\n"
|
||||
"0 1 1\n"
|
||||
"0 2 1\n"
|
||||
"0 3 2\n"
|
||||
"0 4 3\n"
|
||||
"1 5 2\n"
|
||||
"2 6 4\n"
|
||||
"3 6 2\n"
|
||||
"4 6 4\n"
|
||||
"5 6 1\n"
|
||||
"4 6\n"
|
||||
"0 2\n"
|
||||
"0 1 1\n"
|
||||
"1 2 1\n"
|
||||
"1 3 1\n"
|
||||
"3 2 1\n"
|
||||
"2 0 3\n"
|
||||
"3 0 2\n"
|
||||
"6 8\n"
|
||||
"0 1\n"
|
||||
"0 1 1\n"
|
||||
"0 2 2\n"
|
||||
"0 3 3\n"
|
||||
"2 5 3\n"
|
||||
"3 4 2\n"
|
||||
"4 1 1\n"
|
||||
"5 1 1\n"
|
||||
"3 0 1\n"
|
||||
"0 0\n"
|
||||
);
|
||||
|
||||
return tests;
|
||||
}
|
||||
|
||||
vector<string> generate_manual_tests() {
|
||||
vector<string> tests;
|
||||
|
||||
tests.push_back(render_file({
|
||||
make_case(2, 0, 1, {{0, 1, 7}}),
|
||||
make_case(3, 0, 2, {{0, 1, 1}, {1, 2, 1}, {0, 2, 3}}),
|
||||
make_case(4, 0, 3, {{0, 1, 1}, {1, 3, 1}, {0, 2, 1}, {2, 3, 1}}),
|
||||
}));
|
||||
|
||||
tests.push_back(render_file({
|
||||
make_layered_case(8, 12),
|
||||
make_no_path_case(10, 18),
|
||||
make_unique_second_case(12),
|
||||
}));
|
||||
|
||||
tests.push_back(render_file({
|
||||
make_case(5, 0, 4, {
|
||||
{0, 1, 1}, {1, 4, 2}, {0, 2, 1}, {2, 4, 2},
|
||||
{0, 3, 4}, {3, 4, 1}, {1, 3, 10}, {2, 3, 10}
|
||||
}),
|
||||
make_case(6, 5, 0, {
|
||||
{5, 1, 2}, {1, 0, 2}, {5, 2, 2}, {2, 0, 2},
|
||||
{5, 3, 5}, {3, 4, 1}, {4, 0, 1}
|
||||
}),
|
||||
}));
|
||||
|
||||
return tests;
|
||||
}
|
||||
|
||||
vector<string> generate_random_tests() {
|
||||
vector<string> tests;
|
||||
|
||||
for (int i = 0; i < RANDOM_FILES; i++) {
|
||||
int cases = rnd.next(1, i < 10 ? 8 : 4);
|
||||
vector<Case> data;
|
||||
|
||||
for (int c = 0; c < cases; c++) {
|
||||
int max_n = 40;
|
||||
if (i > RANDOM_FILES / 3) max_n = 120;
|
||||
if (i > 2 * RANDOM_FILES / 3) max_n = 300;
|
||||
|
||||
int n = rnd.next(2, max_n);
|
||||
int max_m = min(MAX_M, n * (n - 1));
|
||||
int m = rnd.next(1, max_m);
|
||||
int style = rnd.next(0, 4);
|
||||
|
||||
if (style == 0) {
|
||||
data.push_back(make_random_case(n, m));
|
||||
} else if (style == 1) {
|
||||
data.push_back(make_layered_case(max(4, n), m));
|
||||
} else if (style == 2) {
|
||||
data.push_back(make_no_path_case(n, m));
|
||||
} else {
|
||||
data.push_back(make_unique_second_case(n));
|
||||
}
|
||||
}
|
||||
|
||||
tests.push_back(render_file(data));
|
||||
}
|
||||
|
||||
return tests;
|
||||
}
|
||||
|
||||
vector<string> generate_extreme_tests() {
|
||||
vector<string> tests;
|
||||
|
||||
tests.push_back(render_file({
|
||||
make_random_case(MAX_N, MAX_M),
|
||||
}));
|
||||
|
||||
tests.push_back(render_file({
|
||||
make_layered_case(MAX_N, MAX_M),
|
||||
}));
|
||||
|
||||
tests.push_back(render_file({
|
||||
make_no_path_case(MAX_N, MAX_M),
|
||||
}));
|
||||
|
||||
vector<Case> many;
|
||||
for (int i = 0; i < 100; i++) {
|
||||
int n = rnd.next(2, 30);
|
||||
int m = rnd.next(1, min(100, n * (n - 1)));
|
||||
many.push_back(make_random_case(n, m));
|
||||
}
|
||||
tests.push_back(render_file(many));
|
||||
|
||||
return tests;
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
registerGen(argc, argv, 1);
|
||||
|
||||
vector<string> tests;
|
||||
size_t test = 0;
|
||||
|
||||
append(tests, generate_sample_tests());
|
||||
append(tests, generate_manual_tests());
|
||||
append(tests, generate_random_tests());
|
||||
append(tests, generate_extreme_tests());
|
||||
|
||||
for (const string& t : tests) {
|
||||
startTest(++test);
|
||||
cout << t;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
7293
quase-menor-caminho/src/jngen.h
Normal file
7293
quase-menor-caminho/src/jngen.h
Normal file
File diff suppressed because it is too large
Load Diff
1
quase-menor-caminho/src/script.sh
Normal file
1
quase-menor-caminho/src/script.sh
Normal file
@@ -0,0 +1 @@
|
||||
generator
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user