QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#525666#2674. Vision programarbuzick#32 1ms4440kbC++201.8kb2024-08-20 20:09:052024-08-20 20:09:08

Judging History

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

  • [2024-08-20 20:09:08]
  • 评测
  • 测评结果:32
  • 用时:1ms
  • 内存:4440kb
  • [2024-08-20 20:09:05]
  • 提交

answer

#include "vision.h"

#include <bits/stdc++.h>

using namespace std;

vector<int> multiply(vector<int> a, vector<int> b) {
    vector<int> res(a.size() + b.size() - 1);
    for (int i = 0; i < (int)res.size(); ++i) {
        vector<int> temp;
        for (int j = 0; j < (int)a.size(); ++j) {
            if (i - j >= 0 && i - j < (int)b.size()) {
                temp.push_back(add_and({a[j], b[i - j]}));
            }
        }
        res[i] = add_or(temp);
    }
    return res;
}

void construct_network(int h, int w, int k) {
    vector<int> hs(h), ws(w);
    for (int i = 0; i < h; ++i) {
        vector<int> ns;
        for (int j = 0; j < w; ++j) {
            ns.push_back(i * w + j);
        }
        hs[i] = add_or(ns);
    }
    for (int i = 0; i < w; ++i) {
        vector<int> ns;
        for (int j = 0; j < h; ++j) {
            ns.push_back(j * w + i);
        }
        ws[i] = add_or(ns);
    }
    vector<int> hd(h), wd(w);
    vector<int> a = hs, b = hs;
    reverse(b.begin(), b.end());
    vector<int> res = multiply(a, b);
    hd[0] = add_xor(hs);
    for (int i = 1; i < h; ++i) {
        hd[i] = add_or({res[h - 1 - i], res[h - 1 + i]});
    }
    a = ws, b = ws;
    reverse(b.begin(), b.end());
    res = multiply(a, b);
    wd[0] = add_xor(ws);
    for (int i = 1; i < w; ++i) {
        wd[i] = add_or({res[w - 1 - i], res[w - 1 + i]});
    }
    vector<int> temp;
    for (int i = 0; i < (int)hd.size() && i <= k; ++i) {
        if (k - i < (int)wd.size()) {
            if (w != 1 && h != 1) {
                temp.push_back(add_and({hd[i], wd[k - i]}));
            } else if (i == 0 || i == k) {
                temp.push_back(add_and({hd[i], wd[k - i]}));
            }
        }
    }
    add_or(temp);
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 10
Accepted

Test #1:

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

input:

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

output:

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

result:

ok 

Test #2:

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

input:

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

output:

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

result:

ok 

Test #3:

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

input:

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

output:

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

result:

ok 

Test #4:

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

input:

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

output:

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

result:

ok 

Test #5:

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

input:

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

output:

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

result:

ok 

Test #6:

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

input:

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

output:

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

result:

ok 

Test #7:

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

input:

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

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
34
1 3 0 1 2
1 3 3 4 5
1 2 0 3
1 2 1 4
1 2 2 5
0 2 6 7
1 1 11
0 2 6 6
0 2 7 7
1 2 13 14
0 2 7 6
1 1 16
2 2 6 7
1 2 12 17
0 2 8 10
1 1 20
0 2 8 9
0 2 9 10
1 2 22 23
0 2 8 8
0 2 9 9
0 2 10 10
1 3 25 26 27
0 2 9 8
0 2 10 9
1 2 29 30
0 2 10 8
1 1 32
2 3 8 9 10
1 2...

result:

ok 

Test #8:

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

input:

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

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
34
1 3 0 1 2
1 3 3 4 5
1 2 0 3
1 2 1 4
1 2 2 5
0 2 6 7
1 1 11
0 2 6 6
0 2 7 7
1 2 13 14
0 2 7 6
1 1 16
2 2 6 7
1 2 12 17
0 2 8 10
1 1 20
0 2 8 9
0 2 9 10
1 2 22 23
0 2 8 8
0 2 9 9
0 2 10 10
1 3 25 26 27
0 2 9 8
0 2 10 9
1 2 29 30
0 2 10 8
1 1 32
2 3 8 9 10
1 2...

result:

ok 

Test #9:

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

input:

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

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
33
1 3 0 1 2
1 3 3 4 5
1 2 0 3
1 2 1 4
1 2 2 5
0 2 6 7
1 1 11
0 2 6 6
0 2 7 7
1 2 13 14
0 2 7 6
1 1 16
2 2 6 7
1 2 12 17
0 2 8 10
1 1 20
0 2 8 9
0 2 9 10
1 2 22 23
0 2 8 8
0 2 9 9
0 2 10 10
1 3 25 26 27
0 2 9 8
0 2 10 9
1 2 29 30
0 2 10 8
1 1 32
2 3 8 9 10
1 2...

result:

ok 

Test #10:

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

input:

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

output:

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

result:

ok 

Test #11:

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

input:

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

output:

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

result:

ok 

Test #12:

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

input:

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

output:

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

result:

ok 

Test #13:

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

input:

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

output:

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

result:

ok 

Test #14:

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

input:

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

output:

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

result:

ok 

Test #15:

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

input:

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

output:

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

result:

ok 

Test #16:

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

input:

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

output:

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

result:

ok 

Test #17:

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

input:

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

output:

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

result:

ok 

Test #18:

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

input:

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

output:

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

result:

ok 

Subtask #2:

score: 11
Accepted

Test #19:

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

input:

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

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
122
1 9 0 1 2 3 4 5 6 7 8
1 1 0
1 1 1
1 1 2
1 1 3
1 1 4
1 1 5
1 1 6
1 1 7
1 1 8
0 2 9 9
1 1 19
2 1 9
0 2 10 18
1 1 22
0 2 10 17
0 2 11 18
1 2 24 25
0 2 10 16
0 2 11 17
0 2 12 18
1 3 27 28 29
0 2 10 15
0 2 11 16
0 2 12 17
0 2 13 18
1 4 31 32 33 34
0 2 10 14
0 2...

result:

ok 

Test #20:

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

input:

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

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
122
1 1 0
1 1 1
1 1 2
1 1 3
1 1 4
1 1 5
1 1 6
1 1 7
1 1 8
1 9 0 1 2 3 4 5 6 7 8
0 2 9 17
1 1 19
0 2 9 16
0 2 10 17
1 2 21 22
0 2 9 15
0 2 10 16
0 2 11 17
1 3 24 25 26
0 2 9 14
0 2 10 15
0 2 11 16
0 2 12 17
1 4 28 29 30 31
0 2 9 13
0 2 10 14
0 2 11 15
0 2 12 16...

result:

ok 

Test #21:

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

input:

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

output:

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

result:

ok 

Test #22:

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

input:

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

output:

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

result:

ok 

Test #23:

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

input:

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

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
281
1 10 0 1 2 3 4 5 6 7 8 9
1 10 10 11 12 13 14 15 16 17 18 19
1 10 20 21 22 23 24 25 26 27 28 29
1 10 30 31 32 33 34 35 36 37 38 39
1 10 40 41 42 43 44 45 46 47 48 49
1 10 50 51 52 53 54 55 56 57 58 59
1 10 60 61 62 63 64 65 66 67 68 69
1 10 70 71 72 73 74 7...

result:

ok 

Test #24:

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

input:

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

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
285
1 10 0 1 2 3 4 5 6 7 8 9
1 10 10 11 12 13 14 15 16 17 18 19
1 10 20 21 22 23 24 25 26 27 28 29
1 10 30 31 32 33 34 35 36 37 38 39
1 10 40 41 42 43 44 45 46 47 48 49
1 10 50 51 52 53 54 55 56 57 58 59
1 10 60 61 62 63 64 65 66 67 68 69
1 10 70 71 72 73 74 7...

result:

ok 

Test #25:

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

input:

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

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
289
1 10 0 1 2 3 4 5 6 7 8 9
1 10 10 11 12 13 14 15 16 17 18 19
1 10 20 21 22 23 24 25 26 27 28 29
1 10 30 31 32 33 34 35 36 37 38 39
1 10 40 41 42 43 44 45 46 47 48 49
1 10 50 51 52 53 54 55 56 57 58 59
1 10 60 61 62 63 64 65 66 67 68 69
1 10 70 71 72 73 74 7...

result:

ok 

Test #26:

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

input:

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

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
284
1 10 0 1 2 3 4 5 6 7 8 9
1 10 10 11 12 13 14 15 16 17 18 19
1 10 20 21 22 23 24 25 26 27 28 29
1 10 30 31 32 33 34 35 36 37 38 39
1 10 40 41 42 43 44 45 46 47 48 49
1 10 50 51 52 53 54 55 56 57 58 59
1 10 60 61 62 63 64 65 66 67 68 69
1 10 70 71 72 73 74 7...

result:

ok 

Test #27:

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

input:

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

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
280
1 10 0 1 2 3 4 5 6 7 8 9
1 10 10 11 12 13 14 15 16 17 18 19
1 10 20 21 22 23 24 25 26 27 28 29
1 10 30 31 32 33 34 35 36 37 38 39
1 10 40 41 42 43 44 45 46 47 48 49
1 10 50 51 52 53 54 55 56 57 58 59
1 10 60 61 62 63 64 65 66 67 68 69
1 10 70 71 72 73 74 7...

result:

ok 

Subtask #3:

score: 11
Accepted

Dependency #2:

100%
Accepted

Test #28:

score: 11
Accepted
time: 1ms
memory: 4204kb

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
2055
1 30 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
1 30 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
1 30 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 8...

result:

ok 

Test #29:

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

input:

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

output:

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

result:

ok 

Test #30:

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

input:

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

output:

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

result:

ok 

Test #31:

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

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
1306
1 15 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
1 15 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
1 15 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
1 15 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
1 15 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
1 15 75 76 77 7...

result:

ok 

Test #32:

score: 11
Accepted
time: 1ms
memory: 3892kb

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
1307
1 30 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
1 30 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
1 30 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 8...

result:

ok 

Test #33:

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

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
2041
1 30 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
1 30 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
1 30 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 8...

result:

ok 

Test #34:

score: 11
Accepted
time: 1ms
memory: 4192kb

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
2055
1 30 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
1 30 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
1 30 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 8...

result:

ok 

Test #35:

score: 11
Accepted
time: 1ms
memory: 3912kb

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
2069
1 30 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
1 30 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
1 30 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 8...

result:

ok 

Test #36:

score: 11
Accepted
time: 1ms
memory: 3936kb

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
2054
1 30 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
1 30 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
1 30 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 8...

result:

ok 

Test #37:

score: 11
Accepted
time: 1ms
memory: 4008kb

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
2040
1 30 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
1 30 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
1 30 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 8...

result:

ok 

Subtask #4:

score: 0
Wrong Answer

Dependency #3:

100%
Accepted

Test #38:

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

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: 0
Wrong Answer

Test #48:

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

input:

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

output:

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

result:

wrong answer WA in grader: Too many instructions

Subtask #6:

score: 0
Wrong Answer

Test #70:

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

input:

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

output:

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

result:

ok 

Test #71:

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

input:

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

output:

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

result:

ok 

Test #72:

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

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
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: 1ms
memory: 4440kb

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%