QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#859656#9678. 网友小 Z 的树rqoi03170 552ms44388kbC++201.6kb2025-01-17 21:28:392025-01-17 21:28:53

Judging History

你现在查看的是最新测评结果

  • [2025-01-17 21:28:53]
  • 评测
  • 测评结果:70
  • 用时:552ms
  • 内存:44388kb
  • [2025-01-17 21:28:39]
  • 提交

answer

#include"diameter.h"
#include<stdio.h>
#include<algorithm>
#include<utility>
#include<tuple>
std::pair<int,int> find_diameter(int task_id,int n) {
    if(n==1) {
        return {1,1};
    }
    if(n==2) {
        return {1,2};
    }
    if(n==3) {
        if(in(1,2,3)) {
            return {2,3};
        }
        if(in(2,1,3)) {
            return {1,3};
        }
        return {1,2};
    }
    const auto find([&](const int &x,const int &y)->std::tuple<std::tuple<int,int>,std::tuple<int,int>> {
        std::tuple<int,int> min(1000000000,0),max(-1000000000,0);
        for(int i=1;i<=n;i++) {
            if(i==x||i==y) {
                continue;
            }
            std::tuple<int,int> tmp(query(x,y,i),i);
            min=std::min(min,tmp);
            max=std::max(max,tmp);
        }
        return {min,max};
    });
    const auto dis([&](const int &x,const int &y)->int {
        return std::get<0>(std::get<0>(find(x,y)));
    });
    int a{std::get<1>(std::get<1>(find(1,2)))};
    int b{std::get<1>(std::get<1>(find(1,a)))};
    auto [r0,r1](find(a,b));
    fprintf(stderr,"a = %d, b = %d\n",a,b);
    auto &[d0,x](r0);
    auto &[s,c](r1);
    fprintf(stderr,"x = %d\n",x);
    fprintf(stderr,"c = %d\n",c);
    if(x==c) {
        return {a,b};
    }
    int d1{dis(a,c)},d2{dis(b,c)};
    // if(in(x,a,c)) {
    //     d1=query(x,a,c),d2=s-d0-d1;
    // }
    // else {
    //     d2=query(x,b,c),d1=s-d0-d2;
    // }
    if(d0>=d1&&d0>=d2) {
        return {a,b};
    }
    if(d1>=d2) {
        return {a,c};
    }
    return {b,c};
}

详细

Subtask #1:

score: 16
Accepted

Test #1:

score: 16
Accepted
time: 2ms
memory: 10180kb

input:

1 100
25
1 3
2 18
3 8
4 18
5 14
6 22
7 18
8 10
9 11
10 12
11 25
12 16
13 11
14 17
15 17
16 25
17 2
18 20
19 18
20 12
21 1
22 17
23 14
24 1
50
1 37
2 27
3 10
4 25
5 16
6 17
7 10
8 36
9 16
10 6
11 48
12 2
13 28
14 30
15 10
16 44
17 31
18 1
19 6
20 7
21 30
22 42
23 45
24 23
25 27
26 39
27 45
28 48
29 4...

output:

correct

result:

ok Correct

Subtask #2:

score: 15
Accepted

Dependency #1:

100%
Accepted

Test #2:

score: 15
Accepted
time: 58ms
memory: 16132kb

input:

2 2006
42
1 32
2 4
3 6
4 29
5 1
6 42
7 10
8 16
9 6
10 25
11 42
12 8
13 36
14 8
15 17
16 3
17 6
18 21
19 23
20 31
21 42
22 6
23 32
24 7
25 27
26 34
27 31
28 6
29 41
30 20
31 9
32 7
33 3
34 5
35 5
36 1
37 8
38 14
39 15
40 12
41 22
95
1 94
2 88
3 13
4 71
5 37
6 45
7 87
8 24
9 76
10 54
11 69
12 95
13 90...

output:

correct

result:

ok Correct

Test #3:

score: 15
Accepted
time: 384ms
memory: 22324kb

input:

2 100
10000
5442 1084
1084 8984
8984 3299
3299 6385
6385 6079
6079 6806
6806 2300
2300 2996
2996 1765
1765 257
257 5537
5537 2337
2337 5445
5445 2873
2873 336
336 6307
6307 4968
4968 8078
8078 9944
9944 5675
5675 7896
7896 5943
5943 2412
2412 7448
7448 7852
7852 1684
1684 3437
3437 3980
3980 1919
19...

output:

correct

result:

ok Correct

Test #4:

score: 15
Accepted
time: 429ms
memory: 23604kb

input:

2 100
10000
1 5915
2 3020
3 9265
4 5171
5 1304
6 6769
7 1914
8 4904
9 7545
10 2296
11 4189
12 3509
13 7725
14 133
15 4023
16 7720
17 2707
18 9553
19 5215
20 6984
21 4421
22 2279
23 33
24 4737
25 4205
26 9619
27 1848
28 4322
29 5602
30 1476
31 2636
32 8841
33 3701
34 590
35 8382
36 9625
37 240
38 311...

output:

correct

result:

ok Correct

Test #5:

score: 15
Accepted
time: 411ms
memory: 22140kb

input:

2 100
10000
9186 8585
8585 2991
9186 2522
2991 2727
2991 3356
8585 7483
3356 6258
3356 3554
2727 9199
2991 6593
2727 3223
3223 780
2727 1306
7483 6018
3223 2570
7483 826
6258 7695
6593 303
9199 8280
8280 3057
3223 2719
1306 3966
7695 7382
3966 8835
8280 983
7382 5734
8280 3094
3057 4999
2719 5934
73...

output:

correct

result:

ok Correct

Test #6:

score: 15
Accepted
time: 403ms
memory: 23428kb

input:

2 100
10000
258 225
225 9405
9405 2228
225 912
258 2001
2001 7782
9405 2373
258 747
2001 7685
747 1101
7782 7229
2228 5458
2228 9451
9451 2073
2073 7753
5458 2328
7753 1592
1101 6637
2328 5359
1101 4393
4393 8882
1592 928
4393 9422
6637 2468
7753 3759
4393 6763
5359 8404
9422 7471
8882 7360
8404 184...

output:

correct

result:

ok Correct

Test #7:

score: 15
Accepted
time: 404ms
memory: 23648kb

input:

2 100
10000
5715 7993
5715 6965
7993 426
6965 2015
426 1744
2015 9193
426 4406
1744 7821
7821 4607
426 1151
7821 1378
4607 999
7821 5563
1744 8800
4607 3167
7821 4424
4406 6427
8800 2796
5563 8767
6427 2096
2796 659
659 7524
8800 39
4424 2158
8767 1736
2796 4824
659 2410
2096 8710
7524 2078
8710 119...

output:

correct

result:

ok Correct

Test #8:

score: 15
Accepted
time: 315ms
memory: 26340kb

input:

2 100
10000
475 1
475 2
475 3
475 4
475 5
475 6
475 7
475 8
475 9
475 10
475 11
475 12
475 13
475 14
475 15
475 16
475 17
475 18
475 19
475 20
475 21
475 22
475 23
475 24
475 25
475 26
475 27
475 28
475 29
475 30
475 31
475 32
475 33
475 34
475 35
475 36
475 37
475 38
475 39
475 40
475 41
475 42
475...

output:

correct

result:

ok Correct

Subtask #3:

score: 5
Accepted

Dependency #2:

100%
Accepted

Test #9:

score: 5
Accepted
time: 89ms
memory: 20964kb

input:

3 2006
95
1 50
2 83
3 65
4 31
5 64
6 83
7 22
8 17
9 12
10 24
11 81
12 82
13 70
14 71
15 16
16 66
17 68
18 25
19 64
20 90
21 19
22 14
23 4
24 55
25 11
26 15
27 47
28 90
29 33
30 10
31 73
32 4
33 32
34 13
35 46
36 42
37 36
38 17
39 47
40 67
41 23
42 72
43 75
44 92
45 57
46 88
47 78
48 43
49 58
50 62
5...

output:

correct

result:

ok Correct

Test #10:

score: 5
Accepted
time: 451ms
memory: 27976kb

input:

3 50
20000
12483 13249
13249 6419
6419 18097
18097 17847
17847 2932
2932 14960
14960 6371
6371 3371
3371 18403
18403 18882
18882 16513
16513 13330
13330 7685
7685 2725
2725 9445
9445 10962
10962 6952
6952 5108
5108 12657
12657 4299
4299 9621
9621 4521
4521 16644
16644 14790
14790 15234
15234 13858
1...

output:

correct

result:

ok Correct

Test #11:

score: 5
Accepted
time: 484ms
memory: 23968kb

input:

3 50
20000
1 10511
2 8258
3 11981
4 12921
5 14758
6 443
7 5500
8 4105
9 15921
10 19586
11 6477
12 14217
13 9381
14 10767
15 6566
16 3232
17 18904
18 15280
19 17754
20 1743
21 994
22 16695
23 13403
24 2947
25 14089
26 19962
27 12998
28 4014
29 8751
30 8029
31 14686
32 8019
33 13808
34 852
35 2992
36 ...

output:

correct

result:

ok Correct

Test #12:

score: 5
Accepted
time: 463ms
memory: 26360kb

input:

3 50
20000
14783 6405
14783 997
14783 15183
6405 4079
14783 3959
6405 13688
13688 394
6405 18458
997 2652
2652 8182
6405 8855
13688 13569
3959 9652
18458 19932
3959 2233
13688 2925
2925 17109
9652 520
2652 3931
2925 12446
2233 17300
520 11989
17300 14352
17300 1490
14352 17585
17109 15867
3931 7306
...

output:

correct

result:

ok Correct

Test #13:

score: 5
Accepted
time: 461ms
memory: 26228kb

input:

3 50
20000
5219 5072
5072 18451
5219 1483
5219 6164
6164 11035
1483 9913
9913 10220
6164 6063
6164 2560
1483 987
6164 16481
16481 13784
6063 485
10220 11717
2560 16335
6063 19981
987 6387
13784 14504
2560 14762
16481 11230
13784 13201
14504 9437
14762 19951
6387 7610
16335 1501
9437 14901
9437 13391...

output:

correct

result:

ok Correct

Test #14:

score: 5
Accepted
time: 470ms
memory: 26672kb

input:

3 50
20000
11410 9893
11410 2259
11410 13823
2259 14136
9893 18639
2259 5699
9893 13085
9893 13095
2259 4627
5699 5572
13823 12950
13823 17350
12950 12984
4627 14584
5572 9511
13095 18547
17350 13655
17350 11614
14584 17057
5572 1023
13655 3546
17057 8142
1023 2641
17057 13187
13655 10323
11614 1419...

output:

correct

result:

ok Correct

Test #15:

score: 5
Accepted
time: 342ms
memory: 31108kb

input:

3 50
20000
13608 1
13608 2
13608 3
13608 4
13608 5
13608 6
13608 7
13608 8
13608 9
13608 10
13608 11
13608 12
13608 13
13608 14
13608 15
13608 16
13608 17
13608 18
13608 19
13608 20
13608 21
13608 22
13608 23
13608 24
13608 25
13608 26
13608 27
13608 28
13608 29
13608 30
13608 31
13608 32
13608 33
1...

output:

correct

result:

ok Correct

Subtask #4:

score: 5
Accepted

Dependency #3:

100%
Accepted

Test #16:

score: 5
Accepted
time: 122ms
memory: 28504kb

input:

4 2006
72
1 11
2 33
3 63
4 45
5 70
6 23
7 41
8 51
9 63
10 71
11 56
12 36
13 55
14 1
15 45
16 68
17 37
18 65
19 1
20 42
21 16
22 27
23 1
24 14
25 4
26 13
27 52
28 34
29 28
30 72
31 43
32 13
33 47
34 6
35 26
36 69
37 16
38 9
39 47
40 6
41 10
42 50
43 28
44 9
45 35
46 28
47 51
48 68
49 59
50 26
51 10
5...

output:

correct

result:

ok Correct

Test #17:

score: 5
Accepted
time: 472ms
memory: 30040kb

input:

4 33
30000
14256 19392
19392 17693
17693 12064
12064 29690
29690 2629
2629 2231
2231 8291
8291 20777
20777 13056
13056 17592
17592 3521
3521 9564
9564 20486
20486 11910
11910 5841
5841 8074
8074 8949
8949 27794
27794 5140
5140 628
628 23696
23696 219
219 27931
27931 12329
12329 11380
11380 16340
163...

output:

correct

result:

ok Correct

Test #18:

score: 5
Accepted
time: 502ms
memory: 28512kb

input:

4 33
30000
1 10055
2 15066
3 26132
4 2602
5 25450
6 3181
7 10378
8 16011
9 14843
10 5467
11 23120
12 20330
13 4410
14 24149
15 1259
16 25325
17 5148
18 22993
19 14548
20 17083
21 21423
22 4431
23 2608
24 27414
25 7398
26 680
27 6389
28 7789
29 24276
30 23976
31 21652
32 14331
33 4244
34 2538
35 1511...

output:

correct

result:

ok Correct

Test #19:

score: 5
Accepted
time: 477ms
memory: 31380kb

input:

4 33
30000
5160 22570
5160 4162
22570 4564
22570 2953
22570 6160
2953 16958
5160 18469
18469 16390
4564 4820
4820 26260
4820 23921
4820 22416
16390 5064
18469 21384
4820 18969
22416 2213
18469 10791
23921 18801
2213 28618
23921 12934
12934 23199
2213 2731
23199 13937
18801 7907
18969 12659
2213 1006...

output:

correct

result:

ok Correct

Test #20:

score: 5
Accepted
time: 479ms
memory: 31172kb

input:

4 33
30000
5124 14169
14169 7693
14169 3148
7693 7827
7827 5425
14169 4462
7693 5036
7827 1840
5036 15358
3148 354
15358 25457
354 23612
5036 809
15358 28504
15358 220
28504 12793
1840 25908
354 240
25908 14658
354 12184
23612 25257
14658 26851
809 10856
12184 23643
14658 23748
23643 7400
7400 19133...

output:

correct

result:

ok Correct

Test #21:

score: 5
Accepted
time: 505ms
memory: 30088kb

input:

4 33
30000
16458 22215
22215 25117
16458 10098
16458 19468
19468 19780
22215 18948
25117 1930
10098 601
22215 28765
1930 28418
25117 12818
10098 29737
29737 8189
12818 2531
28765 23263
12818 20088
20088 3660
28765 3752
29737 2048
3752 10286
20088 14216
20088 5154
3752 12129
2531 5116
3660 12518
5116...

output:

correct

result:

ok Correct

Test #22:

score: 5
Accepted
time: 350ms
memory: 33356kb

input:

4 33
30000
16829 1
16829 2
16829 3
16829 4
16829 5
16829 6
16829 7
16829 8
16829 9
16829 10
16829 11
16829 12
16829 13
16829 14
16829 15
16829 16
16829 17
16829 18
16829 19
16829 20
16829 21
16829 22
16829 23
16829 24
16829 25
16829 26
16829 27
16829 28
16829 29
16829 30
16829 31
16829 32
16829 33
1...

output:

correct

result:

ok Correct

Subtask #5:

score: 5
Accepted

Dependency #4:

100%
Accepted

Test #23:

score: 5
Accepted
time: 155ms
memory: 32076kb

input:

5 2006
74
1 63
2 63
3 55
4 35
5 36
6 63
7 64
8 71
9 61
10 47
11 18
12 62
13 41
14 59
15 70
16 27
17 5
18 30
19 59
20 65
21 28
22 41
23 18
24 20
25 14
26 4
27 63
28 17
29 37
30 49
31 7
32 64
33 2
34 7
35 32
36 22
37 7
38 26
39 46
40 18
41 37
42 73
43 19
44 53
45 15
46 20
47 53
48 63
49 10
50 15
51 15...

output:

correct

result:

ok Correct

Test #24:

score: 5
Accepted
time: 509ms
memory: 36604kb

input:

5 25
40000
9770 7780
7780 34738
34738 37985
37985 15685
15685 21772
21772 1975
1975 582
582 26341
26341 13165
13165 34397
34397 39627
39627 34769
34769 18282
18282 23951
23951 34185
34185 15227
15227 28159
28159 1721
1721 17784
17784 36525
36525 38137
38137 29531
29531 22379
22379 36276
36276 3637
3...

output:

correct

result:

ok Correct

Test #25:

score: 5
Accepted
time: 527ms
memory: 34508kb

input:

5 25
40000
1 19786
2 20270
3 26558
4 308
5 18939
6 28114
7 29876
8 25726
9 8597
10 26654
11 19829
12 1028
13 4133
14 4851
15 26521
16 29163
17 310
18 27981
19 19834
20 27717
21 30635
22 24263
23 20478
24 7257
25 3035
26 20922
27 17446
28 39771
29 3904
30 11759
31 18587
32 20761
33 12342
34 27898
35 ...

output:

correct

result:

ok Correct

Test #26:

score: 5
Accepted
time: 515ms
memory: 34368kb

input:

5 25
40000
36764 35314
36764 37104
36764 12118
35314 32376
37104 22392
22392 24470
32376 23023
23023 34964
37104 39669
22392 32311
22392 31856
32311 9326
31856 16319
23023 10898
31856 31172
10898 26464
31856 22435
34964 5426
32311 10612
22435 1868
10612 433
10898 6371
10612 27937
6371 10091
5426 274...

output:

correct

result:

ok Correct

Test #27:

score: 5
Accepted
time: 513ms
memory: 33368kb

input:

5 25
40000
10000 5625
5625 14082
14082 34314
34314 29412
14082 38558
29412 35886
35886 31474
5625 22366
35886 33342
22366 12865
38558 13915
35886 4966
29412 3655
33342 20958
13915 23834
4966 7351
20958 24278
3655 10661
4966 32288
12865 12551
32288 37871
32288 37180
20958 4257
32288 37808
24278 39254...

output:

correct

result:

ok Correct

Test #28:

score: 5
Accepted
time: 495ms
memory: 34268kb

input:

5 25
40000
27638 17632
17632 35387
35387 24098
35387 13326
24098 28923
13326 7854
24098 22355
13326 12236
35387 30495
24098 5269
24098 12357
28923 18620
22355 31349
28923 17802
30495 6723
22355 20054
17802 4285
18620 5098
20054 609
18620 17874
4285 19437
31349 30277
31349 32994
30277 23651
19437 283...

output:

correct

result:

ok Correct

Test #29:

score: 5
Accepted
time: 356ms
memory: 38120kb

input:

5 25
40000
31715 1
31715 2
31715 3
31715 4
31715 5
31715 6
31715 7
31715 8
31715 9
31715 10
31715 11
31715 12
31715 13
31715 14
31715 15
31715 16
31715 17
31715 18
31715 19
31715 20
31715 21
31715 22
31715 23
31715 24
31715 25
31715 26
31715 27
31715 28
31715 29
31715 30
31715 31
31715 32
31715 33
3...

output:

correct

result:

ok Correct

Subtask #6:

score: 10
Accepted

Dependency #5:

100%
Accepted

Test #30:

score: 10
Accepted
time: 188ms
memory: 36576kb

input:

6 2006
79
1 62
2 71
3 52
4 23
5 22
6 12
7 65
8 32
9 45
10 67
11 48
12 37
13 67
14 8
15 43
16 65
17 37
18 55
19 47
20 55
21 6
22 23
23 71
24 54
25 10
26 22
27 70
28 56
29 27
30 74
31 37
32 65
33 7
34 26
35 63
36 13
37 22
38 40
39 50
40 19
41 72
42 79
43 76
44 51
45 27
46 17
47 53
48 47
49 63
50 16
51...

output:

correct

result:

ok Correct

Test #31:

score: 10
Accepted
time: 516ms
memory: 41388kb

input:

6 20
50000
3285 10412
10412 43006
43006 155
155 17821
17821 32499
32499 10047
10047 12804
12804 41225
41225 39582
39582 25546
25546 39164
39164 31225
31225 6444
6444 27823
27823 48791
48791 29070
29070 9568
9568 25857
25857 21241
21241 43335
43335 6900
6900 26523
26523 43337
43337 21557
21557 6101
6...

output:

correct

result:

ok Correct

Test #32:

score: 10
Accepted
time: 541ms
memory: 38640kb

input:

6 20
50000
1 41289
2 13163
3 36632
4 848
5 22658
6 3201
7 39605
8 23144
9 21285
10 48692
11 27642
12 7568
13 6462
14 7043
15 30486
16 16297
17 369
18 23604
19 15390
20 48771
21 16268
22 15519
23 5541
24 3583
25 34489
26 38470
27 42370
28 44533
29 30609
30 12722
31 44141
32 15534
33 33876
34 39951
35...

output:

correct

result:

ok Correct

Test #33:

score: 10
Accepted
time: 518ms
memory: 37004kb

input:

6 20
50000
39398 719
719 12720
719 15975
12720 3047
12720 25537
719 24303
39398 12630
25537 35767
12720 41387
25537 32950
15975 4413
4413 35611
35767 7871
7871 19497
35767 17824
4413 2055
35611 17927
7871 29485
35611 32724
29485 22408
7871 25996
25996 17000
22408 49112
32724 36924
32724 37250
22408 ...

output:

correct

result:

ok Correct

Test #34:

score: 10
Accepted
time: 530ms
memory: 37300kb

input:

6 20
50000
32533 28122
28122 35120
35120 47242
47242 8178
47242 31406
47242 28909
32533 5571
8178 32808
31406 41862
31406 19405
5571 28722
31406 48996
41862 810
19405 44645
19405 42059
5571 31749
31749 44442
41862 8963
810 34009
44645 15898
42059 29282
34009 47280
15898 7629
8963 42955
31749 12136
3...

output:

correct

result:

ok Correct

Test #35:

score: 10
Accepted
time: 527ms
memory: 36472kb

input:

6 20
50000
29242 3691
3691 14178
29242 15922
3691 39988
29242 39877
29242 14090
15922 37248
14090 8436
14090 6182
14090 5190
3691 5201
5190 13104
39877 35772
13104 8529
37248 43198
37248 47323
5190 4918
47323 49601
35772 14347
43198 47454
49601 29744
13104 43998
43198 49115
8529 43576
29744 32286
29...

output:

correct

result:

ok Correct

Test #36:

score: 10
Accepted
time: 368ms
memory: 39692kb

input:

6 20
50000
9717 1
9717 2
9717 3
9717 4
9717 5
9717 6
9717 7
9717 8
9717 9
9717 10
9717 11
9717 12
9717 13
9717 14
9717 15
9717 16
9717 17
9717 18
9717 19
9717 20
9717 21
9717 22
9717 23
9717 24
9717 25
9717 26
9717 27
9717 28
9717 29
9717 30
9717 31
9717 32
9717 33
9717 34
9717 35
9717 36
9717 37
97...

output:

correct

result:

ok Correct

Subtask #7:

score: 14
Accepted

Dependency #6:

100%
Accepted

Test #37:

score: 14
Accepted
time: 222ms
memory: 39428kb

input:

7 2006
46
1 36
2 14
3 14
4 33
5 28
6 39
7 29
8 10
9 20
10 20
11 5
12 16
13 24
14 43
15 25
16 13
17 9
18 40
19 4
20 34
21 15
22 25
23 35
24 42
25 29
26 30
27 14
28 17
29 28
30 10
31 30
32 33
33 13
34 2
35 4
36 25
37 1
38 39
39 44
40 44
41 46
42 21
43 46
44 30
45 36
9
1 3
2 4
3 4
4 9
5 4
6 9
7 6
8 3
2...

output:

correct

result:

ok Correct

Test #38:

score: 14
Accepted
time: 508ms
memory: 43888kb

input:

7 16
60000
41210 10893
10893 8223
8223 52928
52928 35748
35748 56311
56311 53725
53725 39778
39778 1262
1262 7230
7230 52429
52429 11421
11421 38244
38244 43612
43612 57526
57526 43165
43165 37497
37497 5109
5109 40305
40305 34648
34648 40929
40929 12214
12214 23989
23989 59778
59778 25817
25817 292...

output:

correct

result:

ok Correct

Test #39:

score: 14
Accepted
time: 534ms
memory: 40900kb

input:

7 16
60000
1 29825
2 46514
3 18106
4 20053
5 17579
6 39845
7 52617
8 41529
9 8100
10 54570
11 1928
12 40720
13 34813
14 14212
15 25648
16 40983
17 5274
18 22938
19 240
20 37948
21 59013
22 47855
23 50954
24 17344
25 24250
26 11720
27 57042
28 12465
29 10693
30 28875
31 26359
32 25383
33 12846
34 424...

output:

correct

result:

ok Correct

Test #40:

score: 14
Accepted
time: 531ms
memory: 42300kb

input:

7 16
60000
13400 21995
13400 48038
48038 33107
33107 53013
48038 12436
33107 48036
21995 23362
48038 36772
23362 46929
21995 41860
48036 16742
48036 42026
23362 13946
41860 16962
36772 38744
13946 19023
42026 43857
41860 1873
16962 6932
19023 36784
16742 20719
43857 54536
54536 6906
19023 56657
5665...

output:

correct

result:

ok Correct

Test #41:

score: 14
Accepted
time: 552ms
memory: 41916kb

input:

7 16
60000
58798 44785
44785 52900
44785 8615
44785 23544
44785 45720
45720 25052
23544 58915
25052 20779
20779 3757
52900 29580
3757 27386
58915 9562
27386 54257
58915 11364
54257 2046
11364 40406
40406 17759
17759 45019
27386 45442
54257 34017
45442 46106
54257 55961
11364 30083
40406 58689
46106 ...

output:

correct

result:

ok Correct

Test #42:

score: 14
Accepted
time: 524ms
memory: 41904kb

input:

7 16
60000
34910 40855
34910 6093
6093 19639
34910 31757
34910 54815
34910 15522
15522 21499
21499 1497
6093 46351
34910 40394
46351 32419
6093 8962
46351 24258
54815 54281
54815 36714
8962 8117
36714 51546
1497 59083
32419 932
8117 27989
27989 35716
27989 34726
36714 58682
34726 41630
932 20809
811...

output:

correct

result:

ok Correct

Test #43:

score: 14
Accepted
time: 355ms
memory: 44388kb

input:

7 16
60000
18053 1
18053 2
18053 3
18053 4
18053 5
18053 6
18053 7
18053 8
18053 9
18053 10
18053 11
18053 12
18053 13
18053 14
18053 15
18053 16
18053 17
18053 18
18053 19
18053 20
18053 21
18053 22
18053 23
18053 24
18053 25
18053 26
18053 27
18053 28
18053 29
18053 30
18053 31
18053 32
18053 33
1...

output:

correct

result:

ok Correct

Subtask #8:

score: 0
Wrong Answer

Dependency #7:

100%
Accepted

Test #44:

score: 0
Wrong Answer
time: 114ms
memory: 39864kb

input:

8 2006
88
1 14
2 88
3 80
4 85
5 53
6 36
7 65
8 72
9 26
10 74
11 18
12 71
13 22
14 23
15 60
16 20
17 51
18 52
19 49
20 18
21 53
22 50
23 57
24 8
25 57
26 59
27 87
28 23
29 18
30 73
31 64
32 35
33 43
34 5
35 7
36 62
37 66
38 54
39 35
40 21
41 88
42 17
43 75
44 49
45 63
46 16
47 19
48 41
49 2
50 56
51 ...

output:

WA

result:

wrong answer Wrong Answer

Subtask #9:

score: 0
Skipped

Dependency #8:

0%

Subtask #10:

score: 0
Skipped

Dependency #9:

0%

Subtask #11:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Dependency #5:

100%
Accepted

Dependency #6:

100%
Accepted

Dependency #7:

100%
Accepted

Dependency #8:

0%