QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#240593#6559. A Tree and Two Edgesucup-team991#WA 26ms14640kbC++172.9kb2023-11-05 16:38:082023-11-05 16:38:08

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3624kb

input:

4 6
1 2
1 3
1 4
2 3
2 4
1 2
1 3
1 4
2 3
2 4
3 4

output:

3
3
3
3
3
4

result:

ok 6 lines

Test #2:

score: 0
Accepted
time: 0ms
memory: 3624kb

input:

6 4
1 2
1 3
1 6
2 3
3 4
3 5
4 5
1 2
1 3
1 4
1 6

output:

2
2
4
1

result:

ok 4 lines

Test #3:

score: 0
Accepted
time: 24ms
memory: 9628kb

input:

50000 50000
11561 23122
14261 28523
24407 48814
17947 35894
14803 29607
19557 39115
12415 24830
9583 19167
18397 36794
439 878
18040 36080
17150 34300
7922 15845
18938 37877
18625 37250
6459 12919
9818 19636
3579 7158
21323 42646
23882 47764
13603 27207
8353 16707
15907 31814
20935 41871
11686 23372...

output:

4
3
3
4
4
3
1
3
4
1
3
4
3
4
3
3
1
3
3
3
4
4
4
3
3
3
4
3
3
3
1
3
3
3
3
4
4
4
4
3
4
3
3
3
4
3
4
4
4
4
3
4
4
4
4
3
3
3
4
4
4
4
4
4
3
4
3
4
1
4
1
1
4
3
3
4
3
3
1
4
3
3
4
4
3
3
4
4
4
3
4
3
4
4
4
4
4
3
4
3
3
3
1
3
4
4
3
4
3
4
3
3
4
1
4
3
3
3
4
4
4
4
3
3
3
3
3
4
4
4
4
3
3
4
3
4
4
3
3
4
4
4
1
3
3
3
3
4
4
3
...

result:

ok 50000 lines

Test #4:

score: 0
Accepted
time: 21ms
memory: 9772kb

input:

50000 50000
1730 3460
17535 35071
14108 28216
20630 41260
2091 4182
8112 16225
21373 42746
6685 13371
21142 42284
12168 24337
22564 45128
16103 32207
9254 18508
21369 42739
1955 3911
13696 27392
3929 7858
1777 3555
23382 46764
830 1660
17722 35444
11495 22991
10184 20369
13697 27395
24728 49456
4037...

output:

1
1
3
3
3
4
4
4
4
4
3
3
3
4
1
3
4
3
3
1
3
3
4
3
1
4
3
3
4
3
3
4
4
4
1
1
4
1
3
4
3
1
4
4
3
3
3
4
1
4
4
1
3
1
3
3
3
1
1
3
3
3
3
3
4
3
4
4
3
3
4
4
4
3
3
4
4
4
3
4
3
3
3
3
3
3
3
3
4
4
1
4
3
4
1
4
4
4
4
3
4
1
4
4
3
4
3
4
3
4
3
1
4
3
1
1
3
3
4
4
1
3
3
3
4
3
3
4
4
4
4
4
3
3
4
3
4
1
1
3
4
4
3
4
4
3
3
4
4
3
...

result:

ok 50000 lines

Test #5:

score: 0
Accepted
time: 24ms
memory: 9652kb

input:

50000 50000
21879 43758
12510 25020
2593 5187
16048 32096
9697 19394
12606 25212
3860 7720
8231 16462
23983 47966
10852 21705
6919 13839
1385 2770
4040 8080
14298 28596
22248 44496
4245 8490
14486 28972
11445 22891
21557 43114
20946 41892
23374 46749
78 157
4617 9234
8198 16396
12228 24456
16125 322...

output:

4
2
2
2
4
2
1
2
2
2
4
2
1
2
4
2
2
4
4
4
2
1
4
2
2
4
2
4
2
2
1
4
2
2
1
1
4
4
2
2
2
4
2
4
2
4
4
4
2
2
4
2
2
4
1
4
1
4
4
2
4
4
2
2
2
2
4
2
2
1
2
1
4
2
4
4
4
4
2
2
2
4
4
1
2
1
2
4
4
4
2
2
2
2
4
4
4
4
4
2
4
2
4
4
2
4
4
4
4
4
2
4
2
2
4
4
4
1
2
2
2
4
1
2
4
1
2
2
4
2
4
4
2
4
2
2
4
1
4
1
2
4
2
2
4
4
4
4
4
4
...

result:

ok 50000 lines

Test #6:

score: 0
Accepted
time: 22ms
memory: 9712kb

input:

50000 50000
1451 2795
8910 29108
638 5810
24117 38535
2769 44109
7603 8789
14090 14819
5315 11076
22885 25853
26110 39470
1513 20322
13635 44414
1284 5229
5998 19700
1872 45691
5872 37168
4991 6456
34921 41632
16532 30269
3118 4987
2732 20486
26292 44061
2054 41607
20367 21071
33204 36717
35801 4725...

output:

2
2
4
4
4
4
4
2
4
4
4
4
4
4
4
2
1
4
4
1
4
4
1
4
4
2
4
2
4
2
1
4
4
4
4
1
1
1
4
2
4
1
4
2
4
1
1
2
2
2
4
4
1
1
1
4
1
1
4
2
4
4
1
4
2
2
4
4
4
2
1
4
4
1
1
4
4
1
2
1
2
1
4
2
1
2
4
2
4
4
4
4
4
1
2
2
1
1
1
4
2
1
4
4
2
4
2
4
4
1
1
4
4
2
2
1
2
1
1
4
4
4
4
4
4
1
1
1
4
2
4
1
2
2
1
4
4
4
4
4
4
1
4
4
2
1
2
2
2
1
...

result:

ok 50000 lines

Test #7:

score: 0
Accepted
time: 26ms
memory: 9708kb

input:

50000 50000
1106 3307
13115 16051
30404 45806
2295 20076
3525 6384
9118 24628
3288 26835
17933 47506
26180 48256
23161 45529
10483 15545
5252 35302
10105 16247
14301 26402
104 216
562 29098
1517 16503
1494 5468
8057 47252
5582 15425
8766 41483
10952 31098
20891 49612
13088 18868
18880 28314
8650 208...

output:

1
2
4
2
4
4
2
4
2
4
4
4
2
2
2
2
4
2
4
4
4
2
4
1
2
1
4
4
1
2
4
2
1
4
4
4
4
4
2
4
4
4
4
1
2
1
2
1
4
4
2
2
4
4
1
4
4
4
2
2
2
1
4
2
4
2
4
4
4
2
2
4
2
2
1
4
4
2
4
4
4
2
1
4
1
4
4
4
4
4
4
1
2
2
2
4
1
2
1
4
2
4
2
4
4
4
1
4
2
4
4
2
4
2
4
2
4
4
1
4
4
2
1
4
4
4
2
4
2
2
2
2
2
4
4
2
4
4
2
2
4
1
2
1
4
4
2
2
2
4
...

result:

ok 50000 lines

Test #8:

score: 0
Accepted
time: 23ms
memory: 12916kb

input:

50000 50000
36923 36924
2905 2906
20948 20949
17459 17460
37562 37563
48652 48653
19674 19675
5083 5084
18973 18974
6652 6653
14171 14172
10957 10958
29643 29644
18578 18579
8742 8743
28856 28857
3692 3693
9716 9717
26628 26629
10272 10273
3581 3582
5952 5953
8810 8811
48242 48243
49449 49450
22461 ...

output:

3
3
3
4
4
3
4
3
3
4
3
3
4
1
3
3
3
4
4
1
4
3
3
1
4
4
3
3
4
1
4
3
4
3
1
3
3
4
3
3
4
3
4
3
3
4
1
4
4
4
4
3
3
1
4
4
1
3
3
3
3
4
3
3
4
3
4
3
3
3
4
3
4
1
4
4
1
4
4
4
3
4
4
4
3
3
1
3
4
4
4
4
4
3
4
3
4
4
3
1
4
4
3
4
4
1
4
4
4
3
3
4
3
4
4
4
3
3
4
3
3
3
4
4
3
4
3
4
4
3
4
3
3
4
1
4
3
4
4
4
4
4
1
4
4
1
1
4
4
4
...

result:

ok 50000 lines

Test #9:

score: 0
Accepted
time: 15ms
memory: 14640kb

input:

50000 50000
24442 24443
33810 33811
1074 1075
19395 19396
17355 17356
18062 18063
16633 16634
14075 14076
16668 16669
42955 42956
2381 2382
8174 8175
33065 33066
23490 23491
12964 12965
43083 43084
34043 34044
3067 3068
32847 32848
34631 34632
20740 20741
5545 5546
36224 36225
40474 40475
8726 8727
...

output:

3
3
4
4
4
3
4
4
4
4
3
4
4
4
4
4
4
3
4
1
1
3
4
4
3
4
4
4
1
4
3
4
4
4
3
4
4
4
4
4
3
3
4
4
3
4
4
1
3
1
4
4
4
4
1
3
4
4
4
4
1
3
3
4
4
4
4
4
3
4
4
4
4
4
4
4
4
4
4
1
3
4
4
1
4
4
4
4
1
4
1
4
4
1
4
1
3
4
4
4
4
4
3
4
4
4
4
3
3
1
4
3
4
3
3
4
3
4
4
4
4
3
4
4
4
3
4
4
4
4
3
1
4
3
3
3
4
4
4
4
4
4
4
4
3
4
1
3
4
3
...

result:

ok 50000 lines

Test #10:

score: 0
Accepted
time: 26ms
memory: 12560kb

input:

50000 50000
40842 40843
12739 12740
46074 46075
30742 30743
22435 22436
4320 4321
9400 9401
40706 40707
8828 8829
18753 18754
49910 49911
39576 39577
8444 8445
25799 25800
49700 49701
37009 37010
2714 2715
25544 25545
38257 38258
48120 48121
16639 16640
49101 49102
13588 13589
15000 15001
46269 4627...

output:

4
4
3
1
3
4
4
4
4
3
3
4
4
1
3
3
4
3
1
4
3
4
3
3
1
3
3
4
3
4
4
4
3
4
3
4
3
3
4
3
4
4
4
1
3
4
4
4
4
3
3
4
4
4
3
4
3
3
3
4
4
4
3
3
4
4
4
4
3
4
3
1
4
3
3
4
1
4
4
3
3
3
4
3
4
4
1
4
4
4
4
4
3
4
4
4
3
3
4
4
3
3
4
1
4
1
3
4
4
4
3
4
4
1
4
4
1
4
3
4
3
4
4
3
4
3
3
4
3
4
3
4
3
3
4
4
4
3
4
4
4
3
4
3
4
4
1
3
1
3
...

result:

ok 50000 lines

Test #11:

score: 0
Accepted
time: 22ms
memory: 9636kb

input:

50000 50000
8009 12254
22108 22277
5752 17047
4139 8705
1591 4046
29067 29462
14609 40048
465 23331
4440 14716
9607 9722
13461 30905
36645 38691
1569 25431
2752 4554
214 34538
36719 44914
21390 24345
29832 31704
21884 44025
23443 39152
7339 21353
11648 46289
1971 3851
13124 18924
24293 31487
14625 2...

output:

3
3
3
3
1
3
1
3
1
3
3
1
3
1
1
1
1
3
3
3
1
4
3
1
3
3
3
3
3
3
3
1
3
3
4
3
3
1
3
3
1
3
1
1
3
3
4
4
3
1
3
1
4
1
3
3
3
3
3
4
3
3
3
1
3
3
1
3
1
3
3
3
3
3
3
3
3
3
1
3
3
3
3
3
4
4
3
4
1
3
1
4
1
3
1
1
1
1
3
1
3
3
3
3
3
3
1
1
3
1
4
3
3
3
3
3
1
3
3
1
3
3
3
3
3
3
1
1
1
1
1
3
3
3
3
3
3
3
1
1
3
4
1
1
3
4
3
3
1
1
...

result:

ok 50000 lines

Test #12:

score: 0
Accepted
time: 26ms
memory: 9620kb

input:

50000 50000
25911 28394
6660 10841
8387 28553
3683 10256
13802 22801
12147 23011
16188 43369
5992 27667
12961 16775
2715 9516
28953 35973
2983 8072
11231 11882
8072 21167
5834 13733
5340 25884
462 1070
959 27073
809 4568
1345 25432
4809 8997
6625 44504
11148 14179
6983 30617
5970 13330
36575 37652
2...

output:

3
3
4
4
3
4
3
3
3
3
3
3
3
4
3
3
3
3
4
3
4
3
3
3
3
3
3
3
3
3
4
4
3
4
4
1
3
3
4
4
3
4
3
3
3
3
4
3
3
1
4
3
3
3
3
4
3
3
1
3
1
1
3
3
4
3
4
3
3
3
4
1
3
3
3
3
3
1
3
1
3
3
3
4
3
3
3
3
4
3
4
3
3
3
3
3
3
3
3
3
3
4
3
3
4
4
3
3
3
1
3
3
3
4
4
3
3
1
3
3
3
3
3
3
3
3
4
4
3
3
3
3
3
3
3
4
3
4
1
4
4
3
3
3
4
1
4
3
3
3
...

result:

ok 50000 lines

Test #13:

score: 0
Accepted
time: 22ms
memory: 9632kb

input:

50000 50000
42553 43740
18549 40701
3806 34236
10812 24567
1202 22133
944 18780
5622 8617
9734 23242
29968 32325
6567 9568
6845 17190
1949 7833
22214 23070
1384 15280
6170 6561
28119 31703
6100 48374
980 8110
8426 15001
3332 7523
8030 23908
974 5799
7318 11335
14037 15714
13671 20465
43715 47320
210...

output:

1
4
4
1
3
1
4
3
3
1
4
4
3
4
1
4
3
3
4
4
4
4
3
3
4
4
4
4
4
3
1
4
4
3
4
4
1
1
4
1
4
3
4
1
1
4
3
3
1
1
1
3
3
3
4
1
1
1
4
4
3
3
3
3
3
1
1
3
1
3
3
3
1
1
3
4
1
1
1
3
3
3
4
1
3
3
1
3
4
3
4
4
3
4
3
4
3
4
3
3
4
3
3
1
3
4
3
1
4
1
1
3
4
1
3
1
4
4
4
4
1
4
1
4
3
1
1
1
3
3
1
3
3
4
1
1
3
3
3
1
1
3
4
4
4
3
4
3
1
1
...

result:

ok 50000 lines

Test #14:

score: 0
Accepted
time: 0ms
memory: 3536kb

input:

4 1
1 2
1 3
1 4
2 3
3 4
2 3

output:

3

result:

ok single line: '3'

Test #15:

score: -100
Wrong Answer
time: 0ms
memory: 3788kb

input:

6 1
1 2
2 6
1 5
2 3
1 4
3 6
4 5
2 4

output:

4

result:

wrong answer 1st lines differ - expected: '2', found: '4'