QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#133138#2674. Vision programbashkort#44 6ms5712kbC++204.1kb2023-08-01 16:17:472024-07-04 01:06:46

Judging History

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

  • [2024-07-04 01:06:46]
  • 评测
  • 测评结果:44
  • 用时:6ms
  • 内存:5712kb
  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-08-01 16:17:47]
  • 提交

answer

#include "vision.h"
#include <bits/stdc++.h>

using namespace std;

struct SegmentTree {
    vector<int> t;
    int sz = 1;

    void init(const vector<int> &a) {
        sz = size(a);
        t.resize(sz * 4);
        build(1, 0, sz, a);
    }

    void build(int x, int lx, int rx, const vector<int> &a) {
        if (lx + 1 == rx) {
            t[x] = a[lx];
        } else {
            build(x << 1, lx, lx + rx >> 1, a);
            build(x << 1 | 1, lx + rx >> 1, rx, a);
            t[x] = add_or({t[x << 1], t[x << 1 | 1]});
        }
    }

    void rangeSum(int l, int r, vector<int> &a, int x, int lx, int rx) {
        if (l >= rx || lx >= r) {
            return;
        }
        if (l <= lx && rx <= r) {
            return a.push_back(t[x]);
        }
        int mid = lx + rx >> 1;
        rangeSum(l, r, a, x << 1, lx, mid);
        rangeSum(l, r, a, x << 1 | 1, mid, rx);
    }

    void rangeOr(int l, int r, vector<int> &a) {
        rangeSum(l, r, a, 1, 0, sz);
    }
};

void construct_network(int H, int W, int K) {
    vector pos1(H, vector<int>(W)), pos2(pos1);
    map<int, vector<int>> mp1, mp2;
    map<int, SegmentTree> st1, st2;

    auto toi = [&](int x, int y) {
        return x * W + y;
    };


//    cout << "here!" << endl;

    for (int sum = 0; sum < H + W; ++sum) {
        int top = 0;
        for (int x = 0; x <= sum; ++x) {
            int y = sum - x;
            if (y < W && x < H) {
                mp1[sum].push_back(toi(x, y));
                pos1[x][y] = top++;
            }
        }
    }

//    cout << "here!" << endl;

    for (int sum = -H + 1; sum < W; ++sum) {
        int top = 0;
        for (int y = 0; y < W; ++y) {
            int x = y - sum;
            if (x >= 0 && x < H && y < W) {
                mp2[sum].push_back(toi(x, y));
                pos2[x][y] = top++;
            }
        }
    }

//    cout << "here!" << endl;

//    for (auto [x, y] : mp1) {
////        cout << "st1: " << x << endl;
//        st1[x].init(y);
//    }
//    for (auto [x, y] : mp2) {
////        cout << "st2: " << x << endl;
//        st2[x].init(y);
//    }


//    cout << "here!" << endl;

    vector<int> orz;

    for (int i = 0; i < H; ++i) {
        for (int j = 0; j < W; ++j) {
            vector<int> a;
            for (int x1 = 0; x1 < H; ++x1) {
                int d = abs(i - x1);
                if (d <= K) {
                    for (int y1 : {j - (K - d), j + (K - d)}) {
                        if (y1 >= 0 && y1 < W && pair{i, j} < pair{x1, y1}) {
                            a.push_back(toi(x1, y1));
                        }
                    }
                }
            }
//            int lx = -1, rx = -1, sum = -1;
//            for (int x1 = 0; x1 <= i; ++x1) {
//                int y1 = j - (K - (i - x1));
//                if (y1 <= j && y1 >= 0 && y1 < W) {
//                    int p = pos1[x1][y1];
//                    assert(sum == -1 || sum == x1 + y1);
//                    sum = x1 + y1;
//                    a.push_back(toi(x1, y1));
//                    lx = lx == -1 ? p : lx;
//                    rx = p + 1;
//                }
//            }
////            cout << "300iq" << endl;
////            if (sum != -1) {
////                st1[sum].rangeOr(lx, rx, a);
////            }
//            lx = -1, rx = -1, sum = -1;
//            for (int x1 = 0; x1 <= i; ++x1) {
//                int y1 = j + (K - (i - x1));
//                if (y1 >= j && y1 >= 0 && y1 < W) {
//                    int p = pos2[x1][y1];
//                    assert(sum == -1 || sum == y1 - x1);
//                    sum = y1 - x1;
//                    a.push_back(toi(x1, y1));
//                    lx = lx == -1 ? p : lx;
//                    rx = p + 1;
//                }
//            }
//            if (sum != -1) {
////                cout << "query2: " << sum << endl;
//                st2[sum].rangeOr(lx, rx, a);
//            }
            if (!a.empty()) {
                orz.push_back(add_and({toi(i, j), add_or(a)}));
            }
        }
    }

    add_or(orz);
}

詳細信息

Subtask #1:

score: 10
Accepted

Test #1:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
1 3 1
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
5
1 1 1
0 2 0 3
1 1 2
0 2 1 5
1 2 4 6

result:

ok 

Test #2:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
1 3 2
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
3
1 1 2
0 2 0 3
1 1 4

result:

ok 

Test #3:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
3 1 1
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
5
1 2 1 1
0 2 0 3
1 2 2 2
0 2 1 5
1 2 4 6

result:

ok 

Test #4:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
3 1 2
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
3
1 2 2 2
0 2 0 3
1 1 4

result:

ok 

Test #5:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
2 2 1
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
7
1 3 1 2 2
0 2 0 4
1 2 3 3
0 2 1 6
1 1 3
0 2 2 8
1 3 5 7 9

result:

ok 

Test #6:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
2 2 2
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
5
1 1 3
0 2 0 4
1 1 2
0 2 1 6
1 2 5 7

result:

ok 

Test #7:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
2 3 1
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
11
1 3 1 3 3
0 2 0 6
1 3 2 4 4
0 2 1 8
1 2 5 5
0 2 2 10
1 1 4
0 2 3 12
1 1 5
0 2 4 14
1 5 7 9 11 13 15

result:

ok 

Test #8:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
2 3 2
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
9
1 2 2 4
0 2 0 6
1 2 3 5
0 2 1 8
1 1 4
0 2 2 10
1 1 5
0 2 3 12
1 4 7 9 11 13

result:

ok 

Test #9:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
2 3 3
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
5
1 1 5
0 2 0 6
1 1 3
0 2 2 8
1 2 7 9

result:

ok 

Test #10:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
3 2 1
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
11
1 3 1 2 2
0 2 0 6
1 2 3 3
0 2 1 8
1 3 3 4 4
0 2 2 10
1 2 5 5
0 2 3 12
1 1 5
0 2 4 14
1 5 7 9 11 13 15

result:

ok 

Test #11:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
3 2 2
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
9
1 3 3 4 4
0 2 0 6
1 3 2 5 5
0 2 1 8
1 1 5
0 2 2 10
1 1 4
0 2 3 12
1 4 7 9 11 13

result:

ok 

Test #12:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
3 2 3
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
5
1 1 5
0 2 0 6
1 1 4
0 2 1 8
1 2 7 9

result:

ok 

Test #13:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
3 3 1
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
17
1 3 1 3 3
0 2 0 9
1 3 2 4 4
0 2 1 11
1 2 5 5
0 2 2 13
1 3 4 6 6
0 2 3 15
1 3 5 7 7
0 2 4 17
1 2 8 8
0 2 5 19
1 1 7
0 2 6 21
1 1 8
0 2 7 23
1 8 10 12 14 16 18 20 22 24

result:

ok 

Test #14:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
3 3 2
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
15
1 4 2 4 6 6
0 2 0 9
1 4 3 5 7 7
0 2 1 11
1 3 4 8 8
0 2 2 13
1 2 5 7
0 2 3 15
1 2 6 8
0 2 4 17
1 1 7
0 2 5 19
1 1 8
0 2 6 21
1 7 10 12 14 16 18 20 22

result:

ok 

Test #15:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
3 3 3
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
11
1 2 5 7
0 2 0 9
1 2 6 8
0 2 1 11
1 2 3 7
0 2 2 13
1 1 8
0 2 3 15
1 1 6
0 2 5 17
1 5 10 12 14 16 18

result:

ok 

Test #16:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
3 3 4
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
5
1 1 8
0 2 0 9
1 1 6
0 2 2 11
1 2 10 12

result:

ok 

Test #17:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
1 2 1
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
3
1 1 1
0 2 0 2
1 1 3

result:

ok 

Test #18:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
2 1 1
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
3
1 2 1 1
0 2 0 2
1 1 3

result:

ok 

Subtask #2:

score: 11
Accepted

Test #19:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
1 9 3
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
13
1 1 3
0 2 0 9
1 1 4
0 2 1 11
1 1 5
0 2 2 13
1 1 6
0 2 3 15
1 1 7
0 2 4 17
1 1 8
0 2 5 19
1 6 10 12 14 16 18 20

result:

ok 

Test #20:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
9 1 5
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
9
1 2 5 5
0 2 0 9
1 2 6 6
0 2 1 11
1 2 7 7
0 2 2 13
1 2 8 8
0 2 3 15
1 4 10 12 14 16

result:

ok 

Test #21:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
10 5 2
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
97
1 4 2 6 10 10
0 2 0 50
1 5 3 5 7 11 11
0 2 1 52
1 5 4 6 8 12 12
0 2 2 54
1 4 7 9 13 13
0 2 3 56
1 3 8 14 14
0 2 4 58
1 4 7 11 15 15
0 2 5 60
1 5 8 10 12 16 16
0 2 6 62
1 5 9 11 13 17 17
0 2 7 64
1 4 12 14 18 18
0 2 8 66
1 3 13 19 19
0 2 9 68
1 4 12 16 20 20...

result:

ok 

Test #22:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
5 10 12
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
13
1 2 39 48
0 2 0 50
1 1 49
0 2 1 52
1 1 40
0 2 8 54
1 2 30 41
0 2 9 56
1 1 49
0 2 10 58
1 1 40
0 2 19 60
1 6 51 53 55 57 59 61

result:

ok 

Test #23:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
10 10 1
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
199
1 3 1 10 10
0 2 0 100
1 3 2 11 11
0 2 1 102
1 3 3 12 12
0 2 2 104
1 3 4 13 13
0 2 3 106
1 3 5 14 14
0 2 4 108
1 3 6 15 15
0 2 5 110
1 3 7 16 16
0 2 6 112
1 3 8 17 17
0 2 7 114
1 3 9 18 18
0 2 8 116
1 2 19 19
0 2 9 118
1 3 11 20 20
0 2 10 120
1 3 12 21 21
0...

result:

ok 

Test #24:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
10 10 5
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
191
1 7 5 14 23 32 41 50 50
0 2 0 100
1 8 6 15 24 33 40 42 51 51
0 2 1 102
1 9 7 16 25 30 34 41 43 52 52
0 2 2 104
1 10 8 17 20 26 31 35 42 44 53 53
0 2 3 106
1 11 9 10 18 21 27 32 36 43 45 54 54
0 2 4 108
1 10 11 19 22 28 33 37 44 46 55 55
0 2 5 110
1 9 12 23...

result:

ok 

Test #25:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
10 10 9
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
159
1 11 9 18 27 36 45 54 63 72 81 90 90
0 2 0 100
1 11 19 28 37 46 55 64 73 80 82 91 91
0 2 1 102
1 11 29 38 47 56 65 70 74 81 83 92 92
0 2 2 104
1 11 39 48 57 60 66 71 75 82 84 93 93
0 2 3 106
1 11 49 50 58 61 67 72 76 83 85 94 94
0 2 4 108
1 11 40 51 59 62 ...

result:

ok 

Test #26:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
10 10 14
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
61
1 5 59 68 77 86 95
0 2 0 100
1 4 69 78 87 96
0 2 1 102
1 3 79 88 97
0 2 2 104
1 2 89 98
0 2 3 106
1 1 99
0 2 4 108
1 1 90
0 2 5 110
1 2 80 91
0 2 6 112
1 3 70 81 92
0 2 7 114
1 4 60 71 82 93
0 2 8 116
1 5 50 61 72 83 94
0 2 9 118
1 4 69 78 87 96
0 2 10 120
...

result:

ok 

Test #27:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
10 10 18
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
5
1 1 99
0 2 0 100
1 1 90
0 2 9 102
1 2 101 103

result:

ok 

Subtask #3:

score: 11
Accepted

Dependency #2:

100%
Accepted

Test #28:

score: 11
Accepted
time: 0ms
memory: 3920kb

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
30 30 15
100 198
292 896
132 11
161 406
319 701
460 596
369 959
191 730
128 923
590 1006
31 451
230 575
143 515
149 571
73 554
699 559
302 658
455 1017
252 283
137 380
159 965
260 639
46 527
332 968
57 457
439 686
320 339
157 358
696 620
727 1022
623 949
35 609
7...

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
1771
1 17 15 44 73 102 131 160 189 218 247 276 305 334 363 392 421 450 450
0 2 0 900
1 18 16 45 74 103 132 161 190 219 248 277 306 335 364 393 420 422 451 451
0 2 1 902
1 19 17 46 75 104 133 162 191 220 249 278 307 336 365 390 394 421 423 452 452
0 2 2 904
1 2...

result:

ok 

Test #29:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
1 29 15
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
29
1 1 15
0 2 0 29
1 1 16
0 2 1 31
1 1 17
0 2 2 33
1 1 18
0 2 3 35
1 1 19
0 2 4 37
1 1 20
0 2 5 39
1 1 21
0 2 6 41
1 1 22
0 2 7 43
1 1 23
0 2 8 45
1 1 24
0 2 9 47
1 1 25
0 2 10 49
1 1 26
0 2 11 51
1 1 27
0 2 12 53
1 1 28
0 2 13 55
1 14 30 32 34 36 38 40 42 44 ...

result:

ok 

Test #30:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
29 1 13
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
33
1 2 13 13
0 2 0 29
1 2 14 14
0 2 1 31
1 2 15 15
0 2 2 33
1 2 16 16
0 2 3 35
1 2 17 17
0 2 4 37
1 2 18 18
0 2 5 39
1 2 19 19
0 2 6 41
1 2 20 20
0 2 7 43
1 2 21 21
0 2 8 45
1 2 22 22
0 2 9 47
1 2 23 23
0 2 10 49
1 2 24 24
0 2 11 51
1 2 25 25
0 2 12 53
1 2 26 ...

result:

ok 

Test #31:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
30 15 42
32 210
220 359
210 369
204 275
206 353
210 365
254 353
210 355
207 358
223 374
221 352
222 353
211 274
221 274
220 327
211 352
194 275
207 374
220 375
208 275
223 358
211 275
221 275
210 274
207 353
223 353
210 352
220 374
220 358
210 275
220 353
10 11
1...

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
13
1 2 434 448
0 2 0 450
1 1 449
0 2 1 452
1 1 435
0 2 13 454
1 2 420 436
0 2 14 456
1 1 449
0 2 15 458
1 1 435
0 2 29 460
1 6 451 453 455 457 459 461

result:

ok 

Test #32:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
15 30 2
94 170
33 3
111 73
28 29
312 282
134 224
107 104
93 82
217 222
19 125
436 437
230 231
199 196
298 299
61 50
233 238
362 363
176 146
452 453
491 501
225 195
16 17
241 246
180 181
410 484
450 300
162 163
181 138
446 408
493 482
116 117
164 129
441 447
148 2...

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
897
1 4 2 31 60 60
0 2 0 450
1 5 3 30 32 61 61
0 2 1 452
1 5 4 31 33 62 62
0 2 2 454
1 5 5 32 34 63 63
0 2 3 456
1 5 6 33 35 64 64
0 2 4 458
1 5 7 34 36 65 65
0 2 5 460
1 5 8 35 37 66 66
0 2 6 462
1 5 9 36 38 67 67
0 2 7 464
1 5 10 37 39 68 68
0 2 8 466
1 5 11...

result:

ok 

Test #33:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
30 30 1
64 184
397 491
205 206
278 279
366 367
566 567
421 387
156 250
528 529
415 400
429 430
748 749
413 507
408 390
68 69
649 759
79 429
1012 1013
79 64
368 369
963 964
64 65
147 241
37 38
336 702
171 137
240 222
239 224
305 306
133 134
688 670
996 998
742 546...

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
1799
1 3 1 30 30
0 2 0 900
1 3 2 31 31
0 2 1 902
1 3 3 32 32
0 2 2 904
1 3 4 33 33
0 2 3 906
1 3 5 34 34
0 2 4 908
1 3 6 35 35
0 2 5 910
1 3 7 36 36
0 2 6 912
1 3 8 37 37
0 2 7 914
1 3 9 38 38
0 2 8 916
1 3 10 39 39
0 2 9 918
1 3 11 40 40
0 2 10 920
1 3 12 41 ...

result:

ok 

Test #34:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
30 30 15
94 198
999 950
457 594
733 622
77 497
395 699
578 902
340 698
110 375
475 651
367 560
633 941
336 644
426 279
320 301
177 485
173 62
271 976
373 258
12 277
358 995
225 148
451 747
4 502
112 362
714 1018
544 1011
368 707
532 914
708 673
757 838
52 435
202...

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
1771
1 17 15 44 73 102 131 160 189 218 247 276 305 334 363 392 421 450 450
0 2 0 900
1 18 16 45 74 103 132 161 190 219 248 277 306 335 364 393 420 422 451 451
0 2 1 902
1 19 17 46 75 104 133 162 191 220 249 278 307 336 365 390 394 421 423 452 452
0 2 2 904
1 2...

result:

ok 

Test #35:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
30 30 29
94 212
85 934
369 600
122 969
208 497
151 594
51 972
739 967
330 903
505 270
436 744
428 853
279 296
239 979
141 761
149 923
249 368
240 479
171 604
441 971
300 551
386 918
305 905
273 1001
298 540
705 964
251 661
536 985
272 930
16 583
651 1021
112 904
...

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
1379
1 31 29 58 87 116 145 174 203 232 261 290 319 348 377 406 435 464 493 522 551 580 609 638 667 696 725 754 783 812 841 870 870
0 2 0 900
1 31 59 88 117 146 175 204 233 262 291 320 349 378 407 436 465 494 523 552 581 610 639 668 697 726 755 784 813 840 842 ...

result:

ok 

Test #36:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
30 30 44
94 227
59 866
167 925
78 1006
459 937
110 937
242 968
195 657
149 635
254 738
83 1011
81 660
90 897
186 633
50 567
185 990
250 728
196 925
195 694
209 563
186 571
144 529
213 528
252 724
144 909
425 897
250 635
225 695
484 939
149 914
190 931
173 900
19 ...

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
481
1 15 479 508 537 566 595 624 653 682 711 740 769 798 827 856 885
0 2 0 900
1 14 509 538 567 596 625 654 683 712 741 770 799 828 857 886
0 2 1 902
1 13 539 568 597 626 655 684 713 742 771 800 829 858 887
0 2 2 904
1 12 569 598 627 656 685 714 743 772 801 83...

result:

ok 

Test #37:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
30 30 58
12 241
240 882
241 883
237 919
236 918
202 919
236 953
241 916
239 882
241 882
236 919
323 322
323 289

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
5
1 1 899
0 2 0 900
1 1 870
0 2 29 902
1 2 901 903

result:

ok 

Subtask #4:

score: 0
Wrong Answer

Dependency #3:

100%
Accepted

Test #38:

score: 0
Wrong Answer
time: 4ms
memory: 5712kb

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
100 100 50
100 373
2576 5424
552 2444
1090 3586
698 7992
6043 6838
1364 8276
6025 8816
2900 5141
3114 3664
302 2171
3930 5433
2225 7225
6218 8326
1972 9191
1325 1432
5656 8200
5864 8290
4135 6498
3016 6790
8474 9563
6462 8785
2409 7590
6598 7251
1916 4460
276 447...

output:

b17553fd-ba5a-4140-836c-491f938c515b
WA
Too many instructions

result:

wrong answer WA in grader: Too many instructions

Subtask #5:

score: 12
Accepted

Test #48:

score: 12
Accepted
time: 0ms
memory: 3924kb

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
1 199 1
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
397
1 1 1
0 2 0 199
1 1 2
0 2 1 201
1 1 3
0 2 2 203
1 1 4
0 2 3 205
1 1 5
0 2 4 207
1 1 6
0 2 5 209
1 1 7
0 2 6 211
1 1 8
0 2 7 213
1 1 9
0 2 8 215
1 1 10
0 2 9 217
1 1 11
0 2 10 219
1 1 12
0 2 11 221
1 1 13
0 2 12 223
1 1 14
0 2 13 225
1 1 15
0 2 14 227
1 1 1...

result:

ok 

Test #49:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
1 199 99
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
201
1 1 99
0 2 0 199
1 1 100
0 2 1 201
1 1 101
0 2 2 203
1 1 102
0 2 3 205
1 1 103
0 2 4 207
1 1 104
0 2 5 209
1 1 105
0 2 6 211
1 1 106
0 2 7 213
1 1 107
0 2 8 215
1 1 108
0 2 9 217
1 1 109
0 2 10 219
1 1 110
0 2 11 221
1 1 111
0 2 12 223
1 1 112
0 2 13 225
1...

result:

ok 

Test #50:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
1 199 100
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
199
1 1 100
0 2 0 199
1 1 101
0 2 1 201
1 1 102
0 2 2 203
1 1 103
0 2 3 205
1 1 104
0 2 4 207
1 1 105
0 2 5 209
1 1 106
0 2 6 211
1 1 107
0 2 7 213
1 1 108
0 2 8 215
1 1 109
0 2 9 217
1 1 110
0 2 10 219
1 1 111
0 2 11 221
1 1 112
0 2 12 223
1 1 113
0 2 13 225
...

result:

ok 

Test #51:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
1 199 198
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
3
1 1 198
0 2 0 199
1 1 200

result:

ok 

Test #52:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
199 1 2
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
395
1 2 2 2
0 2 0 199
1 2 3 3
0 2 1 201
1 2 4 4
0 2 2 203
1 2 5 5
0 2 3 205
1 2 6 6
0 2 4 207
1 2 7 7
0 2 5 209
1 2 8 8
0 2 6 211
1 2 9 9
0 2 7 213
1 2 10 10
0 2 8 215
1 2 11 11
0 2 9 217
1 2 12 12
0 2 10 219
1 2 13 13
0 2 11 221
1 2 14 14
0 2 12 223
1 2 15 15...

result:

ok 

Test #53:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
199 1 66
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
267
1 2 66 66
0 2 0 199
1 2 67 67
0 2 1 201
1 2 68 68
0 2 2 203
1 2 69 69
0 2 3 205
1 2 70 70
0 2 4 207
1 2 71 71
0 2 5 209
1 2 72 72
0 2 6 211
1 2 73 73
0 2 7 213
1 2 74 74
0 2 8 215
1 2 75 75
0 2 9 217
1 2 76 76
0 2 10 219
1 2 77 77
0 2 11 221
1 2 78 78
0 2 ...

result:

ok 

Test #54:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
199 1 133
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
133
1 2 133 133
0 2 0 199
1 2 134 134
0 2 1 201
1 2 135 135
0 2 2 203
1 2 136 136
0 2 3 205
1 2 137 137
0 2 4 207
1 2 138 138
0 2 5 209
1 2 139 139
0 2 6 211
1 2 140 140
0 2 7 213
1 2 141 141
0 2 8 215
1 2 142 142
0 2 9 217
1 2 143 143
0 2 10 219
1 2 144 144
0...

result:

ok 

Test #55:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
199 1 197
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
5
1 2 197 197
0 2 0 199
1 2 198 198
0 2 1 201
1 2 200 202

result:

ok 

Test #56:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
1 200 1
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
399
1 1 1
0 2 0 200
1 1 2
0 2 1 202
1 1 3
0 2 2 204
1 1 4
0 2 3 206
1 1 5
0 2 4 208
1 1 6
0 2 5 210
1 1 7
0 2 6 212
1 1 8
0 2 7 214
1 1 9
0 2 8 216
1 1 10
0 2 9 218
1 1 11
0 2 10 220
1 1 12
0 2 11 222
1 1 13
0 2 12 224
1 1 14
0 2 13 226
1 1 15
0 2 14 228
1 1 1...

result:

ok 

Test #57:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
1 200 50
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
301
1 1 50
0 2 0 200
1 1 51
0 2 1 202
1 1 52
0 2 2 204
1 1 53
0 2 3 206
1 1 54
0 2 4 208
1 1 55
0 2 5 210
1 1 56
0 2 6 212
1 1 57
0 2 7 214
1 1 58
0 2 8 216
1 1 59
0 2 9 218
1 1 60
0 2 10 220
1 1 61
0 2 11 222
1 1 62
0 2 12 224
1 1 63
0 2 13 226
1 1 64
0 2 14 ...

result:

ok 

Test #58:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
1 200 99
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
203
1 1 99
0 2 0 200
1 1 100
0 2 1 202
1 1 101
0 2 2 204
1 1 102
0 2 3 206
1 1 103
0 2 4 208
1 1 104
0 2 5 210
1 1 105
0 2 6 212
1 1 106
0 2 7 214
1 1 107
0 2 8 216
1 1 108
0 2 9 218
1 1 109
0 2 10 220
1 1 110
0 2 11 222
1 1 111
0 2 12 224
1 1 112
0 2 13 226
1...

result:

ok 

Test #59:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
1 200 100
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
201
1 1 100
0 2 0 200
1 1 101
0 2 1 202
1 1 102
0 2 2 204
1 1 103
0 2 3 206
1 1 104
0 2 4 208
1 1 105
0 2 5 210
1 1 106
0 2 6 212
1 1 107
0 2 7 214
1 1 108
0 2 8 216
1 1 109
0 2 9 218
1 1 110
0 2 10 220
1 1 111
0 2 11 222
1 1 112
0 2 12 224
1 1 113
0 2 13 226
...

result:

ok 

Test #60:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
1 200 149
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
103
1 1 149
0 2 0 200
1 1 150
0 2 1 202
1 1 151
0 2 2 204
1 1 152
0 2 3 206
1 1 153
0 2 4 208
1 1 154
0 2 5 210
1 1 155
0 2 6 212
1 1 156
0 2 7 214
1 1 157
0 2 8 216
1 1 158
0 2 9 218
1 1 159
0 2 10 220
1 1 160
0 2 11 222
1 1 161
0 2 12 224
1 1 162
0 2 13 226
...

result:

ok 

Test #61:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
1 200 199
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
3
1 1 199
0 2 0 200
1 1 201

result:

ok 

Test #62:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
200 1 1
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
399
1 2 1 1
0 2 0 200
1 2 2 2
0 2 1 202
1 2 3 3
0 2 2 204
1 2 4 4
0 2 3 206
1 2 5 5
0 2 4 208
1 2 6 6
0 2 5 210
1 2 7 7
0 2 6 212
1 2 8 8
0 2 7 214
1 2 9 9
0 2 8 216
1 2 10 10
0 2 9 218
1 2 11 11
0 2 10 220
1 2 12 12
0 2 11 222
1 2 13 13
0 2 12 224
1 2 14 14
0...

result:

ok 

Test #63:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
200 1 51
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
299
1 2 51 51
0 2 0 200
1 2 52 52
0 2 1 202
1 2 53 53
0 2 2 204
1 2 54 54
0 2 3 206
1 2 55 55
0 2 4 208
1 2 56 56
0 2 5 210
1 2 57 57
0 2 6 212
1 2 58 58
0 2 7 214
1 2 59 59
0 2 8 216
1 2 60 60
0 2 9 218
1 2 61 61
0 2 10 220
1 2 62 62
0 2 11 222
1 2 63 63
0 2 ...

result:

ok 

Test #64:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
200 1 99
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
203
1 2 99 99
0 2 0 200
1 2 100 100
0 2 1 202
1 2 101 101
0 2 2 204
1 2 102 102
0 2 3 206
1 2 103 103
0 2 4 208
1 2 104 104
0 2 5 210
1 2 105 105
0 2 6 212
1 2 106 106
0 2 7 214
1 2 107 107
0 2 8 216
1 2 108 108
0 2 9 218
1 2 109 109
0 2 10 220
1 2 110 110
0 2...

result:

ok 

Test #65:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
200 1 100
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
201
1 2 100 100
0 2 0 200
1 2 101 101
0 2 1 202
1 2 102 102
0 2 2 204
1 2 103 103
0 2 3 206
1 2 104 104
0 2 4 208
1 2 105 105
0 2 5 210
1 2 106 106
0 2 6 212
1 2 107 107
0 2 7 214
1 2 108 108
0 2 8 216
1 2 109 109
0 2 9 218
1 2 110 110
0 2 10 220
1 2 111 111
0...

result:

ok 

Test #66:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
200 1 150
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
101
1 2 150 150
0 2 0 200
1 2 151 151
0 2 1 202
1 2 152 152
0 2 2 204
1 2 153 153
0 2 3 206
1 2 154 154
0 2 4 208
1 2 155 155
0 2 5 210
1 2 156 156
0 2 6 212
1 2 157 157
0 2 7 214
1 2 158 158
0 2 8 216
1 2 159 159
0 2 9 218
1 2 160 160
0 2 10 220
1 2 161 161
0...

result:

ok 

Test #67:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
200 1 199
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
3
1 2 199 199
0 2 0 200
1 1 201

result:

ok 

Test #68:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
1 2 1
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
3
1 1 1
0 2 0 2
1 1 3

result:

ok 

Test #69:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
2 1 1
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
3
1 2 1 1
0 2 0 2
1 1 3

result:

ok 

Subtask #6:

score: 0
Wrong Answer

Test #70:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
2 2 1
3 128
128 129
128 130
128 131

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
7
1 3 1 2 2
0 2 0 4
1 2 3 3
0 2 1 6
1 1 3
0 2 2 8
1 3 5 7 9

result:

ok 

Test #71:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
2 2 2
3 129
129 128
129 131
129 130

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
5
1 1 3
0 2 0 4
1 1 2
0 2 1 6
1 2 5 7

result:

ok 

Test #72:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
101 29 1
8 254
254 255
254 227
254 252
254 196
254 224
254 2958
254 2986
254 226

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
5857
1 3 1 29 29
0 2 0 2929
1 3 2 30 30
0 2 1 2931
1 3 3 31 31
0 2 2 2933
1 3 4 32 32
0 2 3 2935
1 3 5 33 33
0 2 4 2937
1 3 6 34 34
0 2 5 2939
1 3 7 35 35
0 2 6 2941
1 3 8 36 36
0 2 7 2943
1 3 9 37 37
0 2 8 2945
1 3 10 38 38
0 2 9 2947
1 3 11 39 39
0 2 10 2949...

result:

ok 

Test #73:

score: 0
Accepted
time: 6ms
memory: 4280kb

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
101 29 31
92 284
284 330
284 634
284 598
284 114
284 366
284 966
284 814
284 922
284 510
284 474
284 194
284 930
284 42
284 230
284 1002
284 438
284 526
284 778
284 186
284 6
284 958
284 150
284 562
284 886
284 78
284 402
284 850
284 482
284 222
284 367
284 671
2...

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
5293
1 30 115 143 171 199 227 255 283 311 339 367 395 423 451 479 507 535 563 591 619 647 675 703 731 759 787 815 843 871 899 899
0 2 0 2929
1 30 144 172 200 228 256 284 312 340 368 396 424 452 480 508 536 564 592 620 648 676 704 732 760 788 816 844 870 872 90...

result:

ok 

Test #74:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
101 29 64
92 317
317 1326
317 1566
317 1090
317 1962
317 1046
317 1890
317 2034
317 1190
317 1934
317 1442
317 1074
317 1846
317 1118
317 1234
317 1298
317 1162
317 1862
317 1398
317 2006
317 1918
317 1470
317 1262
317 1514
317 1370
317 1594
317 1486
317 1414
317...

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
3379
1 30 1072 1100 1128 1156 1184 1212 1240 1268 1296 1324 1352 1380 1408 1436 1464 1492 1520 1548 1576 1604 1632 1660 1688 1716 1744 1772 1800 1828 1856 1856
0 2 0 2929
1 30 1101 1129 1157 1185 1213 1241 1269 1297 1325 1353 1381 1409 1437 1465 1493 1521 1549...

result:

ok 

Test #75:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
101 29 95
92 348
348 1738
348 3066
348 1682
348 2058
348 2886
348 3030
348 2830
348 2094
348 2866
348 1774
348 2454
348 2310
348 2546
348 2490
348 2238
348 2258
348 2510
348 2142
348 2394
348 2294
348 2402
348 2202
348 2114
348 2922
348 2430
348 1718
348 2210
348...

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
1581
1 30 1971 1999 2027 2055 2083 2111 2139 2167 2195 2223 2251 2279 2307 2335 2363 2391 2419 2447 2475 2503 2531 2559 2587 2615 2643 2671 2699 2727 2755 2755
0 2 0 2929
1 30 2000 2028 2056 2084 2112 2140 2168 2196 2224 2252 2280 2308 2336 2364 2392 2420 2448...

result:

ok 

Test #76:

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

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
101 29 128
7 381
381 2606
381 2578
381 2573
381 2601
381 352
381 353
381 380

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
5
1 1 2928
0 2 0 2929
1 1 2900
0 2 28 2931
1 2 2930 2932

result:

ok 

Test #77:

score: -8
Wrong Answer
time: 2ms
memory: 4276kb

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
44 135 1
8 303
303 302
303 424
303 301
303 33
303 423
303 5660
303 6018
303 425

output:

b17553fd-ba5a-4140-836c-491f938c515b
WA
Too many instructions

result:

wrong answer WA in grader: Too many instructions

Subtask #7:

score: 0
Wrong Answer

Test #101:

score: 0
Wrong Answer
time: 0ms
memory: 5156kb

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
200 200 1
100 524
24804 34853
20956 34628
18830 29184
28919 32573
11364 24911
2226 5624
3715 30838
2206 17143
21162 27531
20198 27242
5007 12724
27160 32586
3535 7307
17015 25466
626 13891
9132 26194
9198 33073
815 7328
6938 21395
9489 30995
10804 21530
14698 394...

output:

b17553fd-ba5a-4140-836c-491f938c515b
WA
Too many instructions

result:

wrong answer WA in grader: Too many instructions

Subtask #8:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

0%