QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#403962#437. Fun Tourbachbeo200721 53ms18808kbC++232.0kb2024-05-02 23:52:302024-05-02 23:52:30

Judging History

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

  • [2024-05-02 23:52:30]
  • 评测
  • 测评结果:21
  • 用时:53ms
  • 内存:18808kb
  • [2024-05-02 23:52:30]
  • 提交

answer

#include "fun.h"
#include <bits/stdc++.h>
using namespace std;

std::vector<int> createFunTour(int N, int Q) {
    vector<int> P(N);
    int X=0,Min=N;
    for(int i=0;i<N;i++){
        int sz=attractionsBehind(0,i);
        if(sz>N/2 && sz<Min) X=i;
    }
    vector<int> D(N),cc;
    for(int i=0;i<N;i++){
        D[i]=hoursRequired(X,i);
        if(D[i]==1) cc.push_back(i);
    }
    int S=(int)cc.size();
    vector<vector<int>> G(S);
    for(int i=0;i<N;i++){
        if(i==X) continue;
        int j=0;
        while(j+1<S && hoursRequired(cc[j],i)+D[cc[j]]!=D[i]) j++;
        G[j].push_back(i);
    }
    for(int i=0;i<S;i++){
        sort(G[i].begin(),G[i].end(),[&](int x,int y){
            return D[x]>D[y];
        });
    }
    //cout << X << '\n';
    P[0]=X;
    int T=1,c=-1;
    while(T<N){
        int Max=0;
        for(int i=0;i<S;i++) Max=max(Max,(int)G[i].size());
        if(2*Max==N-T) break;
        else if(2*Max>N-T){
            for(int i=0;i<S;i++) if((int)G[i].size()==Max){
                P[T++]=G[i].back();
                G[i].pop_back();c=i;
                break;
            }
            continue;
        }
        int u=-1;Min=N;
        for(int i=0;i<S;i++){
            if(c==i) continue;
            if(D[G[i].back()]<Min) Min=D[G[i].back()],u=i;
        }
        P[T++]=G[u].back();
        G[u].pop_back();c=u;
    }
    int u=-1;
    for(int i=0;i<S;i++) if(2*(int)G[i].size()==N-T) u=i;
    vector<int> A,B;
    for(int i=0;i<S;i++){
        if(u==i) A=G[i];
        else B.insert(B.end(),G[i].begin(),G[i].end());
    }
    if(c!=u) swap(A,B);
    sort(A.begin(),A.end(),[&](int x,int y){
        return D[x]>D[y];
    });
    sort(B.begin(),B.end(),[&](int x,int y){
        return D[x]>D[y];
    });
    while(!A.empty()){
        P[T++]=B.back();
        P[T++]=A.back();
        B.pop_back();
        A.pop_back();
    }
    reverse(P.begin(),P.end());
    return P;
}

詳細信息

Subtask #1:

score: 0
Accepted

Test #1:

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

input:

2 400000
1 0

output:

1 0

result:

ok correct

Test #2:

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

input:

3 400000
1 0
2 0

output:

1 2 0

result:

ok correct

Subtask #2:

score: 0
Accepted

Test #3:

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

input:

4 400000
1 0
2 0
3 1

output:

3 2 1 0

result:

ok correct

Test #4:

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

input:

9 400000
1 0
2 0
3 1
4 1
5 2
6 2
7 3
8 3

output:

7 5 8 6 3 2 4 0 1

result:

ok correct

Test #5:

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

input:

14 400000
1 0
2 0
3 1
4 1
5 2
6 2
7 3
8 3
9 4
10 4
11 5
12 5
13 6

output:

7 11 8 12 9 13 10 5 3 6 4 2 1 0

result:

ok correct

Test #6:

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

input:

15 400000
1 0
2 0
3 1
4 1
5 2
6 2
7 3
8 3
9 4
10 4
11 5
12 5
13 6
14 6

output:

7 11 8 12 9 13 10 14 3 5 4 6 1 2 0

result:

ok correct

Test #7:

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

input:

16 400000
1 0
2 0
3 1
4 1
5 2
6 2
7 3
8 3
9 4
10 4
11 5
12 5
13 6
14 6
15 7

output:

15 11 7 12 8 13 9 14 10 5 3 6 4 2 1 0

result:

ok correct

Test #8:

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

input:

17 400000
1 0
2 0
3 1
4 1
5 2
6 2
7 3
8 3
9 4
10 4
11 5
12 5
13 6
14 6
15 7
16 7

output:

15 11 16 12 7 13 8 14 9 5 10 6 3 2 4 0 1

result:

ok correct

Subtask #3:

score: 0
Wrong Answer

Test #9:

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

input:

4 400000
1 0
2 1
3 2

output:

3 0 2 1

result:

ok correct

Test #10:

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

input:

12 400000
5 4
6 5
7 6
10 9
8 10
11 8
7 11
3 7
2 3
1 2
0 1

output:

0 9 1 10 4 8 5 2 11 6 3 7

result:

ok correct

Test #11:

score: -0
Wrong Answer
time: 0ms
memory: 4016kb

input:

17 400000
1 2
3 1
4 3
5 4
6 5
8 9
10 8
11 12
10 11
7 10
6 7
13 6
14 13
15 14
0 15
16 0

output:

WA: Tour is not fun

result:

wrong output format Expected integer, but "WA:" found

Subtask #4:

score: 0
Wrong Answer

Test #13:

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

input:

4 400000
0 1
0 2
0 3

output:

2 3 1 0

result:

ok correct

Test #14:

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

input:

17 400000
6 4
3 6
8 3
7 8
13 7
15 13
2 15
11 2
14 11
9 14
5 9
1 5
12 1
10 12
16 10
0 16

output:

4 0 6 3 8 7 13 15 2 11 14 9 5 1 12 10 16

result:

ok correct

Test #15:

score: -0
Wrong Answer
time: 0ms
memory: 4024kb

input:

17 400000
11 3
9 3
10 11
13 11
16 9
5 9
4 10
1 10
14 13
2 13
8 16
0 16
6 5
12 5
7 4
15 4

output:

WA: Tour is not fun

result:

wrong output format Expected integer, but "WA:" found

Subtask #5:

score: 0
Accepted

Test #20:

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

input:

18 400000
1 0
2 0
3 1
4 1
5 2
6 2
7 3
8 3
9 4
10 4
11 5
12 5
13 6
14 6
15 7
16 7
17 8

output:

15 11 16 12 17 13 7 14 8 5 9 6 10 2 4 3 0 1

result:

ok correct

Test #21:

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

input:

27 400000
1 0
2 0
3 1
4 1
5 2
6 2
7 3
8 3
9 4
10 4
11 5
12 5
13 6
14 6
15 7
16 7
17 8
18 8
19 9
20 9
21 10
22 10
23 11
24 11
25 12
26 12

output:

15 23 16 24 17 25 18 26 19 11 20 12 21 13 22 14 7 5 9 6 10 8 2 4 3 0 1

result:

ok correct

Test #22:

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

input:

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

output:

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

result:

ok correct

Test #23:

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

input:

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

output:

327 442 351 469 334 498 333 497 332 496 331 495 330 494 329 493 328 492 336 491 326 490 325 489 324 488 323 487 322 486 321 441 320 484 367 483 337 482 338 481 339 480 340 479 341 478 342 477 343 476 344 475 345 474 346 473 347 472 348 471 349 457 350 426 335 456 319 458 352 459 353 460 354 461 355 ...

result:

ok correct

Test #24:

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

input:

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

output:

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

result:

ok correct

Test #25:

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

input:

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

output:

87 95 79 118 94 117 93 116 92 115 91 114 90 113 89 112 88 111 78 110 86 109 85 108 84 107 83 105 82 96 81 97 80 98 67 99 63 100 77 101 76 102 75 103 74 104 73 106 72 57 71 56 70 61 69 55 68 54 66 53 65 52 64 51 36 49 46 48 45 47 44 58 43 60 42 62 41 59 40 50 39 24 38 30 31 28 32 27 33 26 34 25 35 23...

result:

ok correct

Test #26:

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

input:

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

output:

127 95 170 126 169 125 168 124 167 123 166 122 165 121 164 120 163 119 162 118 161 117 160 116 159 115 173 114 145 113 144 112 143 111 142 110 141 109 140 108 139 107 138 106 137 105 136 104 135 103 134 102 133 101 132 100 131 99 130 98 129 97 128 96 146 171 147 172 148 62 149 47 150 48 151 49 152 5...

result:

ok correct

Subtask #6:

score: 0
Wrong Answer

Test #27:

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

input:

18 400000
7 6
8 7
5 8
4 5
3 4
9 3
10 11
12 10
13 12
14 13
9 14
2 9
15 2
16 15
17 16
1 17
0 1

output:

6 0 7 1 11 8 10 5 12 4 13 3 14 9 2 15 16 17

result:

ok correct

Test #28:

score: -0
Wrong Answer
time: 1ms
memory: 4084kb

input:

500 400000
8 7
9 8
9 10
11 9
13 12
13 14
15 13
15 16
11 15
17 11
20 19
20 21
18 20
22 18
24 23
24 25
26 24
28 27
26 28
22 26
17 22
29 17
30 31
32 30
33 34
32 33
35 32
37 36
38 39
37 38
35 37
40 35
29 40
41 29
42 41
43 42
45 44
45 46
47 45
49 48
49 50
47 49
51 47
53 52
53 54
55 53
57 56
57 58
55 57
5...

output:

WA: Tour is not fun

result:

wrong output format Expected integer, but "WA:" found

Subtask #7:

score: 0
Wrong Answer

Test #33:

score: 0
Accepted
time: 1ms
memory: 3900kb

input:

500 400000
33 414
398 33
254 398
400 254
376 400
302 376
466 302
362 466
301 362
267 301
417 267
413 417
14 413
305 14
353 305
83 353
227 83
57 227
446 57
406 446
154 406
336 154
195 336
405 195
264 405
76 264
203 76
459 203
178 459
72 178
296 72
488 296
404 488
60 404
156 60
393 156
108 393
216 108...

output:

414 212 33 88 398 124 254 399 400 190 376 10 302 366 466 234 362 432 301 28 267 188 417 237 413 64 14 268 305 39 353 349 83 345 227 125 57 70 446 276 406 420 154 369 336 48 195 211 405 482 264 8 76 22 203 487 459 9 178 230 72 339 296 95 488 340 404 50 60 102 156 174 393 47 108 461 216 424 106 181 31...

result:

ok correct

Test #34:

score: -0
Wrong Answer
time: 1ms
memory: 4068kb

input:

500 400000
243 472
21 472
171 243
31 243
419 21
366 21
474 171
246 171
363 31
201 31
317 419
458 419
59 366
7 366
417 474
394 474
351 246
191 246
431 363
202 363
397 201
81 201
28 317
237 317
71 458
221 458
239 59
429 59
0 7
60 7
418 417
18 417
240 394
341 394
440 351
485 351
373 191
487 191
261 431...

output:

WA: Tour is not fun

result:

wrong output format Expected integer, but "WA:" found

Subtask #8:

score: 0
Accepted

Test #41:

score: 0
Accepted
time: 1ms
memory: 3804kb

input:

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

output:

327 485 351 499 334 498 333 497 332 496 331 495 330 494 329 493 328 492 336 491 326 490 325 489 324 488 323 487 322 443 321 470 320 484 367 483 337 482 338 481 339 480 340 479 341 478 342 477 343 476 344 475 345 474 346 473 347 472 348 486 349 458 350 427 335 457 319 459 352 460 353 461 354 462 355 ...

result:

ok correct

Test #42:

score: 0
Accepted
time: 29ms
memory: 11596kb

input:

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

output:

40966 58951 40974 58950 40973 58959 40972 58958 40971 58957 40970 58956 40969 58955 40968 58954 40967 58953 41023 58952 40965 58923 40964 58922 40963 58949 40962 58948 40961 58947 40960 58946 40975 58945 41022 58944 40976 58943 40977 58942 40978 58932 40979 58931 40980 58940 40981 58939 40982 58938 ...

result:

ok correct

Test #43:

score: 0
Accepted
time: 1ms
memory: 3868kb

input:

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

output:

351 479 382 510 381 509 380 508 379 507 378 506 377 505 376 504 375 503 374 502 373 501 372 500 371 499 370 498 369 497 368 496 335 463 366 494 365 493 364 492 363 491 362 490 361 489 360 488 359 487 358 486 357 485 356 484 355 483 354 482 353 481 352 480 255 383 350 478 349 477 348 476 347 475 346 ...

result:

ok correct

Test #44:

score: 0
Accepted
time: 53ms
memory: 17468kb

input:

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

output:

82739 99985 82731 99998 82732 99997 82733 99996 82734 99995 82815 99994 82736 99993 82737 99992 82738 99991 82730 99990 82740 99989 82741 99988 82742 99973 82743 99986 82744 99151 82745 99984 82746 99983 82747 99982 82721 99981 82905 99980 82906 99979 82907 99978 82908 99977 82909 99976 82910 99975 ...

result:

ok correct

Test #45:

score: 0
Accepted
time: 1ms
memory: 4156kb

input:

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

output:

646 871 654 827 653 885 652 884 651 883 650 882 649 881 648 880 647 879 703 878 645 877 644 876 643 875 642 874 641 873 640 828 655 856 702 870 656 869 657 868 658 867 659 866 660 865 661 864 662 863 663 862 664 861 665 860 666 859 667 858 668 872 669 843 670 812 686 844 687 845 672 846 673 847 674 ...

result:

ok correct

Test #46:

score: 0
Accepted
time: 1ms
memory: 4312kb

input:

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

output:

1287 2009 1311 2024 1294 2023 1293 2022 1292 2021 1291 2020 1290 2019 1289 2018 1288 2017 1296 2016 1286 2015 1285 2014 1284 2013 1283 2012 1282 1995 1281 2010 1280 2025 1327 2008 1297 2007 1298 2006 1299 2005 1300 2004 1301 2003 1302 2002 1303 2001 1304 2000 1305 1999 1306 1998 1307 1997 1308 1996 ...

result:

ok correct

Test #47:

score: 0
Accepted
time: 2ms
memory: 4088kb

input:

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

output:

2564 2015 2579 2046 2578 2045 2577 2044 2576 2043 2623 2042 2574 2041 2573 2040 2572 2039 2571 2038 2570 2037 2569 2036 2568 2035 2567 2034 2566 2033 2565 2032 2580 1999 2563 2030 2562 2029 2561 2028 2560 2027 2575 2026 2622 2025 2621 2024 2620 2023 2619 2022 2618 2021 2617 2020 2616 2019 2615 2018 ...

result:

ok correct

Test #48:

score: 0
Accepted
time: 4ms
memory: 4160kb

input:

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

output:

5127 6944 5151 6943 5134 6549 5133 6954 5132 6953 5131 6952 5130 6951 5129 6950 5128 6949 5136 6948 5126 6947 5125 6946 5124 6945 5123 6906 5122 6905 5121 6942 5120 6941 5167 6940 5137 6939 5138 6938 5139 6937 5140 6936 5141 6935 5142 6934 5143 6933 5144 6932 5145 6931 5146 6930 5147 6929 5148 6928 ...

result:

ok correct

Test #49:

score: 0
Accepted
time: 3ms
memory: 5056kb

input:

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

output:

10246 13678 10254 13688 10253 13687 10252 13686 10251 13685 10250 13684 10249 13683 10248 13682 10247 13681 10303 13680 10245 13668 10244 12988 10243 13677 10242 13676 10241 13675 10240 13674 10255 13673 10302 13672 10256 13671 10257 13670 10258 13669 10259 13679 10260 13656 10261 13666 10262 13665 ...

result:

ok correct

Test #50:

score: 0
Accepted
time: 10ms
memory: 5724kb

input:

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

output:

18075 16319 18088 16382 18087 16381 18086 16380 18085 16379 18084 16378 18083 16377 18082 16376 18081 16375 18080 16374 18079 16373 18064 16372 18077 16371 18076 16370 18089 16369 18074 16368 18073 16367 18072 16366 18071 16365 18070 16364 18069 16363 18068 16362 18067 16361 18066 16360 18065 16359 ...

result:

ok correct

Subtask #9:

score: 0
Wrong Answer

Test #51:

score: 0
Wrong Answer
time: 1ms
memory: 4128kb

input:

1000 400000
6 5
7 8
6 7
9 6
11 10
11 12
13 11
14 15
13 14
9 13
16 9
18 17
18 19
20 18
22 21
22 23
20 22
24 20
26 25
26 27
28 26
30 29
30 31
28 30
24 28
16 24
32 16
33 32
35 34
35 36
37 35
39 38
39 40
37 39
41 37
43 42
43 44
45 43
47 46
47 48
45 47
41 45
49 41
50 51
52 50
54 53
54 55
52 54
56 52
58 5...

output:

WA: Tour is not fun

result:

wrong output format Expected integer, but "WA:" found

Subtask #10:

score: 0
Wrong Answer

Test #59:

score: 0
Wrong Answer
time: 48ms
memory: 18808kb

input:

99999 400000
11681 58292
11681 63929
49752 11681
30596 74400
30596 39261
49752 30596
19390 49752
89694 31923
19390 89694
54297 19390
42389 12902
42389 60328
72803 42389
69881 43761
69881 95741
72803 69881
96271 72803
63872 20658
63872 93588
35833 63872
48418 44153
35833 48418
96271 35833
54297 96271...

output:

WA: Tour is not fun

result:

wrong output format Expected integer, but "WA:" found

Subtask #11:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

0%

Subtask #12:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

0%

Subtask #13:

score: 21
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #5:

100%
Accepted

Dependency #8:

100%
Accepted

Subtask #14:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #3:

0%

Subtask #15:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

0%