QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#134455#2760. SimurghQwerty1232#30 653ms5728kbC++202.7kb2023-08-03 20:16:172024-07-04 01:15:56

Judging History

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

  • [2024-07-04 01:15:56]
  • 评测
  • 测评结果:30
  • 用时:653ms
  • 内存:5728kb
  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-08-03 20:16:17]
  • 提交

answer

#include "simurgh.h"

// #include <bits/stdc++.h>
#include <algorithm>
#include <cassert>
#include <iostream>
#include <random>

struct DSU {
    std::vector<int> prv;

    DSU(int n) {
        clear(n);
    }

    void clear(int n) {
        prv.assign(n, -1);
    }

    int get(int i) {
        return prv[i] == -1 ? i : prv[i] = get(prv[i]);
    }

    void merge(int u, int v) {
        u = get(u);
        v = get(v);
        assert(u != v);
        prv[u] = v;
    }
};

std::vector<int> find_roads(int n, std::vector<int> u, std::vector<int> v) {
    static std::mt19937 rnd;

    int m = u.size();
    std::vector<std::pair<int, int>> edg(m);
    std::vector<int> gold(m, -1);
    for (int i = 0; i < m; i++) {
        edg[i] = {u[i], v[i]};
    }

    std::vector<int> all(m);
    std::iota(all.begin(), all.end(), 0);
    std::shuffle(all.begin(), all.end(), rnd);

    std::vector<int> ans;
    DSU dsu(n);

    for (int &i : all) {
        auto [u, v] = edg[i];
        if (dsu.get(u) != dsu.get(v)) {
            dsu.merge(u, v);
            ans.push_back(i);
            i = -1;
        }
    }
    all.erase(std::remove(all.begin(), all.end(), -1), all.end());
    int cnt_rl = count_common_roads(ans);

    while (!all.empty()) {
        int id = all.back();
        all.pop_back();

        std::shuffle(ans.begin(), ans.end(), rnd);

        for (int i = 0; i < n - 1; i++) {
            if (gold[ans[i]] == 1) {
                continue;
            }

            std::swap(ans[i], id);

            dsu.clear(n);
            bool fuck = false;
            for (int i : ans) {
                auto [u, v] = edg[i];
                if (dsu.get(u) == dsu.get(v)) {
                    fuck = true;
                    break;
                }
                dsu.merge(u, v);
            }

            if (!fuck) {
                int cnt2 = count_common_roads(ans);
                std::swap(ans[i], id);

                if (cnt2 < cnt_rl) {
                    gold[ans[i]] = true;
                    gold[id] = false;
                    break;
                } else if (cnt2 > cnt_rl) {
                    cnt_rl = cnt2;

                    gold[ans[i]] = false;

                    gold[id] = true;

                    std::swap(ans[i], id);
                    break;
                } else {
                    continue;
                }
            } else {
                std::swap(ans[i], id);
            }
        }
        if (gold[id] == -1) {
            gold[id] = 0;
            std::cerr << "cum: " << id << "\n";
        }
    }
    assert(cnt_rl == n - 1);
    return ans;
}

详细

Subtask #1:

score: 13
Accepted

Test #1:

score: 13
Accepted
time: 1ms
memory: 4024kb

input:

wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd
7 21 30000
2 0
0 1
5 2
2 6
1 3
3 0
6 0
4 5
3 2
4 0
1 4
0 5
4 3
4 6
6 1
2 1
5 3
2 4
5 6
5 1
6 3
7 10 9 13 12 17

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
OK
7 13 12 10 9 17

result:

ok correct

Test #2:

score: 13
Accepted
time: 1ms
memory: 4016kb

input:

wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd
7 21 30000
4 6
1 6
2 3
0 3
2 1
2 6
5 6
6 3
0 2
1 0
4 2
1 3
5 2
5 0
0 6
5 3
4 5
5 1
3 4
1 4
4 0
4 16 10 0 20 18

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
OK
16 0 20 10 4 18

result:

ok correct

Test #3:

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

input:

wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd
7 21 30000
2 5
0 4
4 5
4 3
5 3
1 3
3 6
4 1
6 0
5 6
6 2
6 1
6 4
3 2
2 1
1 0
0 2
5 0
5 1
4 2
0 3
20 17 15 9 2 19

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
OK
19 15 20 2 9 17

result:

ok correct

Test #4:

score: 13
Accepted
time: 1ms
memory: 3724kb

input:

wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd
7 13 30000
2 4
4 3
3 2
0 3
0 4
6 3
6 1
4 5
6 2
1 3
5 6
6 0
6 4
3 9 12 7 0 4

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
OK
12 4 3 7 9 0

result:

ok correct

Test #5:

score: 13
Accepted
time: 0ms
memory: 3984kb

input:

wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd
6 10 30000
5 2
0 1
1 2
0 3
3 2
1 4
0 5
3 5
4 3
1 3
5 0 7 2 1

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
OK
7 2 1 5 0

result:

ok correct

Test #6:

score: 13
Accepted
time: 0ms
memory: 3720kb

input:

wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd
7 16 30000
3 4
2 5
2 1
0 5
1 5
0 2
2 6
6 1
4 6
0 1
2 3
6 3
3 1
1 4
4 5
3 5
0 9 5 15 3 11

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
OK
11 15 0 9 3 5

result:

ok correct

Test #7:

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

input:

wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd
2 1 30000
0 1
0

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
OK
0

result:

ok correct

Test #8:

score: 13
Accepted
time: 0ms
memory: 3980kb

input:

wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd
3 3 30000
0 1
2 0
1 2
2 0

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
OK
2 0

result:

ok correct

Test #9:

score: 13
Accepted
time: 0ms
memory: 4012kb

input:

wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd
6 5 30000
2 4
5 4
4 0
4 1
3 4
3 1 4 0 2

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
OK
3 2 4 0 1

result:

ok correct

Test #10:

score: 13
Accepted
time: 1ms
memory: 4016kb

input:

wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd
6 14 30000
4 2
1 3
4 5
4 1
0 4
0 1
2 3
2 1
0 3
5 3
0 5
0 2
5 2
1 5
13 8 10 7 3

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
OK
3 10 13 7 8

result:

ok correct

Test #11:

score: 13
Accepted
time: 0ms
memory: 3980kb

input:

wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd
7 6 30000
3 0
3 5
4 0
5 6
0 2
1 3
3 4 1 5 0 2

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
OK
2 3 0 5 4 1

result:

ok correct

Test #12:

score: 13
Accepted
time: 1ms
memory: 3860kb

input:

wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd
6 15 30000
4 3
2 3
3 5
2 0
5 2
1 3
1 4
0 5
3 0
4 0
1 0
2 1
4 5
4 2
5 1
9 13 12 6 0

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
OK
13 6 0 12 9

result:

ok correct

Test #13:

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

input:

wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd
7 21 30000
0 2
2 5
3 4
0 3
5 4
4 2
2 1
4 6
5 3
0 1
4 0
1 6
3 6
1 3
1 5
5 0
0 6
4 1
6 5
3 2
2 6
16 3 18 17 4 6

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
OK
17 4 16 18 6 3

result:

ok correct

Subtask #2:

score: 17
Accepted

Dependency #1:

100%
Accepted

Test #14:

score: 17
Accepted
time: 14ms
memory: 4052kb

input:

wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd
50 1225 30000
47 4
24 48
42 13
5 42
19 17
29 31
23 48
37 25
37 43
27 22
43 30
19 44
49 37
39 14
26 46
46 35
49 15
40 19
6 31
37 1
21 0
26 45
6 4
38 36
6 8
20 4
18 24
20 35
5 29
1 19
35 49
29 20
25 10
10 36
2 22
26 11
7 9
24 3
35 38
48 41
22...

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
OK
923 848 851 1006 866 1107 299 24 754 397 478 760 119 212 638 1042 509 458 591 1058 584 770 355 322 195 1199 768 746 1033 221 127 1205 61 552 497 706 377 333 440 860 679 166 62 880 257 1071 795 277 503

result:

ok correct

Test #15:

score: 17
Accepted
time: 11ms
memory: 3760kb

input:

wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd
50 1225 30000
44 29
11 44
39 16
20 31
6 3
9 27
49 27
12 0
27 1
48 49
46 12
35 36
35 11
49 13
23 20
28 26
12 1
42 37
5 15
28 32
6 10
16 7
4 43
4 31
49 34
9 14
2 46
44 30
40 17
14 29
41 18
27 44
13 3
23 40
47 24
16 3
6 26
45 18
24 42
11 10
23...

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
OK
182 1051 256 181 776 151 497 294 933 315 723 552 97 913 228 21 600 562 472 456 633 95 67 1185 204 1055 196 1037 89 354 701 178 849 496 649 48 280 501 275 420 607 1173 769 230 279 678 577 297 88

result:

ok correct

Test #16:

score: 17
Accepted
time: 10ms
memory: 4064kb

input:

wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd
50 1225 30000
12 30
6 44
33 47
7 33
0 2
10 30
30 46
14 11
43 42
13 27
49 24
6 17
21 2
12 21
24 38
5 21
17 0
16 4
26 5
27 32
20 45
6 20
19 0
20 35
47 39
17 39
0 23
26 33
1 17
3 20
4 46
48 21
21 35
24 40
9 29
28 23
9 1
43 34
4 44
18 37
40 13
...

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
OK
784 1048 466 25 1141 894 95 198 966 213 160 222 535 885 326 166 67 56 513 290 524 1075 261 948 917 204 795 997 874 150 907 1064 470 847 273 374 482 841 24 859 1082 438 882 790 93 382 1068 834 610

result:

ok correct

Test #17:

score: 17
Accepted
time: 8ms
memory: 4004kb

input:

wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd
50 1002 30000
35 6
20 23
17 3
16 48
49 29
31 32
38 3
10 39
16 4
47 13
0 19
24 25
42 39
48 44
39 32
1 42
18 8
17 15
19 32
33 23
21 18
7 13
6 0
26 35
34 22
39 13
48 47
6 21
44 7
21 13
43 16
41 43
36 6
25 14
3 49
3 33
47 29
25 45
45 13
12 13
3...

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
OK
823 402 875 96 668 837 685 266 670 963 221 783 403 559 90 712 614 801 841 828 858 213 808 370 898 348 116 440 636 372 308 401 591 112 420 28 304 237 941 4 20 229 313 357 560 135 351 174 436

result:

ok correct

Test #18:

score: 17
Accepted
time: 5ms
memory: 3796kb

input:

wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd
50 371 30000
20 0
5 9
13 38
4 3
12 23
20 42
43 12
27 28
1 42
23 42
14 41
39 9
2 9
10 13
14 32
18 30
6 7
32 3
39 38
12 34
33 0
10 41
32 30
15 43
13 6
2 30
20 14
36 21
17 2
0 28
24 29
19 7
25 15
10 48
21 49
31 7
2 44
7 44
28 40
38 17
33 48
18...

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
OK
274 277 216 300 105 129 14 257 239 290 102 16 309 93 89 238 364 212 234 344 121 140 62 314 279 139 21 193 349 101 27 0 24 38 233 156 45 294 210 152 237 135 82 18 35 131 224 46 74

result:

ok correct

Test #19:

score: 17
Accepted
time: 11ms
memory: 4012kb

input:

wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd
50 1027 30000
46 5
15 29
43 39
16 32
38 5
4 22
13 4
41 5
0 41
39 6
6 8
3 13
25 6
40 25
17 40
47 0
26 15
30 11
27 31
43 45
30 17
35 37
8 27
2 38
35 19
7 12
36 31
41 21
14 25
14 35
15 17
37 2
27 46
24 39
24 29
19 10
28 1
22 35
24 41
16 46
13 ...

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
OK
13 85 506 196 31 986 585 816 583 839 140 488 994 230 660 417 220 974 148 670 1007 173 142 487 983 83 1001 928 398 571 497 170 5 406 77 674 238 313 1021 521 639 988 885 1005 607 645 112 198 158

result:

ok correct

Test #20:

score: 17
Accepted
time: 7ms
memory: 3756kb

input:

wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd
50 965 30000
28 25
38 23
12 44
1 35
45 46
39 4
19 22
40 23
25 49
20 29
30 9
17 2
15 32
32 14
45 7
19 12
40 22
12 35
10 5
49 37
29 31
19 40
22 6
28 46
23 11
2 1
40 24
14 44
44 40
16 47
7 14
38 47
43 34
4 18
17 22
32 30
33 13
36 21
47 37
37 3...

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
OK
332 93 544 352 673 841 570 127 251 74 182 114 551 907 353 161 16 679 157 259 257 952 698 901 50 79 6 146 125 273 799 371 138 335 796 505 911 820 837 508 48 846 213 766 546 346 109 541 45

result:

ok correct

Test #21:

score: 17
Accepted
time: 9ms
memory: 3768kb

input:

wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd
50 900 30000
25 47
5 46
35 22
46 22
15 35
37 46
27 46
29 20
0 7
7 14
8 19
28 38
11 7
9 16
28 0
38 29
30 47
23 11
26 10
3 38
30 49
28 13
45 3
7 17
42 0
30 1
48 2
47 22
18 49
26 34
12 20
40 9
12 38
46 16
24 16
40 30
31 33
45 34
16 25
14 31
4 ...

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
OK
256 360 590 877 605 816 870 533 404 653 566 561 430 897 557 78 323 428 645 351 32 288 745 763 751 298 530 551 252 704 524 502 46 423 211 40 498 291 699 487 727 65 433 703 27 300 196 575 805

result:

ok correct

Test #22:

score: 17
Accepted
time: 9ms
memory: 3756kb

input:

wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd
50 701 30000
1 47
37 0
2 41
32 33
15 40
38 42
5 27
0 9
0 8
10 36
26 42
5 25
41 35
27 2
21 15
40 28
0 15
43 29
37 3
28 18
9 3
47 27
32 38
48 47
28 13
34 32
27 23
40 8
38 15
46 7
24 14
12 46
47 28
20 43
2 48
2 28
22 45
14 27
23 42
30 35
26 18...

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
OK
22 1 11 2 62 39 21 60 61 28 16 57 32 9 76 46 6 84 19 29 3 15 70 37 10 42 26 477 12 31 36 86 33 4 0 5 18 13 7 17 14 23 25 51 24 30 56 55 8

result:

ok correct

Test #23:

score: 17
Accepted
time: 8ms
memory: 4032kb

input:

wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd
50 626 30000
49 25
30 31
0 3
6 11
25 10
19 13
10 49
43 31
7 19
24 28
39 31
15 7
32 30
27 41
18 23
31 13
26 40
19 41
42 30
47 28
5 4
41 24
42 27
15 45
29 14
29 37
42 6
2 42
45 13
27 32
32 20
4 29
4 21
20 24
16 44
14 12
28 6
25 37
10 22
8 48
...

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
OK
38 19 13 97 20 61 26 47 23 30 34 56 46 17 3 44 32 14 12 21 15 43 2 25 0 41 51 52 7 1 77 11 18 4 8 35 37 16 5 66 31 39 49 54 91 27 24 9 10

result:

ok correct

Test #24:

score: 17
Accepted
time: 0ms
memory: 3864kb

input:

wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd
50 601 30000
28 10
43 16
22 35
42 20
8 39
34 33
47 44
47 49
3 9
10 32
34 5
4 14
9 18
19 33
29 38
31 25
8 2
5 4
5 8
40 23
27 21
36 23
10 6
14 26
39 27
44 36
29 47
6 1
2 46
21 15
43 13
28 38
1 23
41 45
3 49
26 15
39 2
11 17
22 0
45 47
48 46
4...

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
OK
23 25 10 2 11 28 70 0 56 8 49 18 12 14 4 22 29 37 17 31 3 7 130 40 1 5 15 27 20 33 47 60 24 39 21 59 34 50 52 6 65 26 38 16 19 30 44 9 13

result:

ok correct

Test #25:

score: 17
Accepted
time: 1ms
memory: 3732kb

input:

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

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
OK
3 44 0 39 70 14 17 10 4 31 84 29 13 1 9 24 20 18 12 40 23 22 41 26 7 5 34 21 16 6 27 11 33 28 15 32 19 35 45 47 8 52 38 2 82 61 69 46 25

result:

ok correct

Test #26:

score: 17
Accepted
time: 7ms
memory: 3756kb

input:

wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd
50 602 30000
23 30
14 19
2 28
37 21
18 35
1 24
35 1
2 7
11 14
41 11
15 30
6 47
16 25
27 21
14 31
26 30
36 14
43 8
47 7
1 15
18 14
38 31
16 10
19 45
49 27
40 4
25 13
31 3
43 26
19 39
47 27
30 1
2 27
34 33
43 36
45 18
4 37
39 23
11 17
37 44
2...

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
OK
16 12 56 30 33 26 19 17 45 0 27 5 41 3 2 93 29 51 36 11 1 75 10 38 6 24 44 7 13 71 21 25 39 9 42 20 18 218 28 47 40 96 15 8 14 67 23 22 4

result:

ok correct

Test #27:

score: 17
Accepted
time: 7ms
memory: 3876kb

input:

wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd
50 627 30000
2 46
48 6
42 10
35 38
19 24
47 39
37 7
12 39
12 31
6 43
9 5
25 28
12 26
30 16
41 48
45 11
44 31
47 15
31 32
36 37
32 43
36 15
7 48
27 28
26 20
0 6
31 18
45 35
37 3
9 20
5 20
40 2
7 43
35 33
39 15
40 27
0 39
28 42
0 38
17 46
6 7...

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
OK
33 25 38 24 45 74 6 21 15 8 17 56 39 0 31 7 84 3 9 18 4 53 5 29 89 1 48 76 72 26 35 37 27 28 14 20 2 59 93 10 19 13 23 12 42 49 16 104 11

result:

ok correct

Test #28:

score: 17
Accepted
time: 3ms
memory: 3720kb

input:

wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd
50 270 30000
20 36
24 11
20 31
45 48
12 16
11 10
36 8
19 31
3 49
6 45
31 33
37 20
41 46
19 33
45 13
44 26
23 20
49 16
40 27
46 45
19 26
33 28
15 25
28 26
43 16
1 31
9 16
19 36
30 9
13 41
0 48
15 49
13 21
28 35
25 49
35 1
47 14
21 41
16 25
1...

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
OK
1 28 57 11 12 217 18 17 44 14 33 5 8 51 30 6 173 22 56 76 32 4 9 2 26 55 3 31 62 87 0 36 86 19 7 25 72 10 15 20 43 65 21 16 159 135 75 24 77

result:

ok correct

Test #29:

score: 17
Accepted
time: 1ms
memory: 3724kb

input:

wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd
50 130 30000
26 14
28 25
10 31
20 12
12 39
12 28
41 19
48 5
20 24
27 4
21 43
21 45
11 29
14 46
29 13
36 27
40 11
0 30
32 34
22 30
27 46
6 22
34 40
46 4
13 15
6 49
22 8
49 22
46 36
42 5
45 43
16 32
30 9
26 27
21 37
27 14
2 30
34 23
18 42
21 ...

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
OK
38 25 22 5 51 19 8 45 29 83 36 31 11 12 15 2 4 37 26 18 47 70 53 16 34 46 65 17 20 32 14 24 0 49 1 10 3 43 13 21 9 64 123 118 7 54 48 39 6

result:

ok correct

Test #30:

score: 17
Accepted
time: 8ms
memory: 3740kb

input:

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

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
OK
11 64 12 1 18 37 0 4 16 22 20 36 21 58 17 14 39 9 6 13 28 40 35 54 10 25 15 32 33 42 24 41 75 29 34 8 5 45 31 27 23 26 3 19 7 30 2 55 46

result:

ok correct

Test #31:

score: 17
Accepted
time: 2ms
memory: 3996kb

input:

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

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
OK
6 11 30 8 1 29 28 4 16 49 20 36 9 7 19 31 40 72 23 0 21 14 51 34 37 10 12 2 24 52 32 45 18 27 42 13 26 5 61 22 43 17 15 33 50 35 48 3 25

result:

ok correct

Test #32:

score: 17
Accepted
time: 8ms
memory: 3788kb

input:

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

output:

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

result:

ok correct

Test #33:

score: 17
Accepted
time: 8ms
memory: 3996kb

input:

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

output:

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

result:

ok correct

Subtask #3:

score: 0
Wrong Answer

Dependency #2:

100%
Accepted

Test #34:

score: 0
Wrong Answer
time: 653ms
memory: 4568kb

input:

wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd
240 28680 30000
77 105
206 25
9 149
62 63
186 223
157 69
181 222
103 184
97 50
227 3
60 109
51 3
188 65
213 224
33 209
133 213
84 23
189 158
138 141
191 195
221 106
44 49
195 86
90 231
202 204
83 43
192 37
46 21
76 34
126 234
59 213
197 41
...

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
WA
NO

result:

wrong answer WA in grader: NO

Subtask #4:

score: 0
Wrong Answer

Test #58:

score: 19
Accepted
time: 1ms
memory: 3944kb

input:

wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd
2 1 12000
1 0
0

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
OK
0

result:

ok correct

Test #59:

score: 19
Accepted
time: 1ms
memory: 3728kb

input:

wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd
10 45 12000
4 8
0 5
2 0
5 8
8 0
3 8
6 4
4 1
2 3
2 1
6 2
1 7
3 7
8 1
7 0
8 6
0 6
9 5
9 6
7 4
7 6
7 9
1 6
3 5
2 5
7 5
3 9
0 3
3 6
2 9
1 5
0 4
7 8
5 4
9 4
5 6
3 1
2 8
7 2
2 4
1 0
9 8
4 3
1 9
9 0
22 41 3 16 7 25 28 11 39

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
OK
7 28 25 41 22 11 16 3 39

result:

ok correct

Test #60:

score: 0
Wrong Answer
time: 454ms
memory: 5728kb

input:

wrslcnopzlckvxbnair_input_simurgh_lmncvpisadngpiqdfngslcnvd
400 79800 12000
32 64
96 254
115 203
7 171
112 81
124 143
336 175
217 328
152 133
124 331
19 91
92 232
152 43
215 169
4 341
363 18
83 99
52 46
248 66
242 187
150 319
335 158
172 150
3 49
126 256
60 153
165 230
265 68
119 380
171 22
35 169
3...

output:

lxndanfdiadsfnslkj_output_simurgh_faifnbsidjvnsidjbgsidjgbs
WA
NO

result:

wrong answer WA in grader: NO

Subtask #5:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

0%