답안 #767750

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
767750 2023-06-27T06:35:46 Z t6twotwo Vision Program (IOI19_vision) C++17
100 / 100
51 ms 6252 KB
#include "vision.h"
#include <bits/stdc++.h>
using namespace std;
void construct_network(int H, int W, int K) {
    vector<int> A(H + W - 1);
    for (int i = 0; i < H + W - 1; i++) {
        int x = max(0, H - i - 1);
        int y = max(0, i - H + 1);
        vector<int> v;
        while (x < H && y < W) {
            v.push_back(x * W + y);
            x++;
            y++;
        }
        A[i] = add_or(v);
    }
    vector<int> B(H + W - 1);
    for (int i = 0; i < H + W - 1; i++) {
        int x = max(0, H - i - 1);
        int y = min(W - 1, H + W - 2 - i);
        vector<int> v;
        while (x < H && y >= 0) {
            v.push_back(x * W + y);
            x++;
            y--;
        }
        B[i] = add_or(v);
    }
    vector<int> p, q;
    for (int i = 0; i + K < H + W - 1; i++) {
        p.push_back(add_and({A[i], A[i + K]}));
    }
    for (int i = 0; i < H + W - 1; i++) {
        vector<int> v{add_and({B[i], add_xor(B)})};;
        for (int j = 1; j <= K && i + j < H + W - 1; j++) {
            v.push_back(B[i + j]);
        }
        q.push_back(add_and({B[i], add_or(v)}));
    }
    vector<int> r, s;
    for (int i = 0; i + K < H + W - 1; i++) {
        r.push_back(add_and({B[i], B[i + K]}));
    }
    for (int i = 0; i < H + W - 1; i++) {
        vector<int> v{add_and({A[i], add_xor(A)})};
        for (int j = 1; j <= K && i + j < H + W - 1; j++) {
            v.push_back(A[i + j]);
        }
        s.push_back(add_and({A[i], add_or(v)}));
    }
    add_or({add_and({add_or(p), add_or(q)}), add_and({add_or(r), add_or(s)})});
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 0 ms 212 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 ms 276 KB Output is correct
16 Correct 0 ms 212 KB Output is correct
17 Correct 0 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 0 ms 212 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 ms 276 KB Output is correct
16 Correct 0 ms 212 KB Output is correct
17 Correct 0 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 1 ms 212 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 1 ms 212 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
23 Correct 0 ms 212 KB Output is correct
24 Correct 1 ms 212 KB Output is correct
25 Correct 1 ms 212 KB Output is correct
26 Correct 1 ms 212 KB Output is correct
27 Correct 1 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 0 ms 212 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 ms 276 KB Output is correct
16 Correct 0 ms 212 KB Output is correct
17 Correct 0 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 1 ms 212 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 1 ms 212 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
23 Correct 0 ms 212 KB Output is correct
24 Correct 1 ms 212 KB Output is correct
25 Correct 1 ms 212 KB Output is correct
26 Correct 1 ms 212 KB Output is correct
27 Correct 1 ms 212 KB Output is correct
28 Correct 2 ms 340 KB Output is correct
29 Correct 1 ms 340 KB Output is correct
30 Correct 1 ms 340 KB Output is correct
31 Correct 1 ms 340 KB Output is correct
32 Correct 1 ms 340 KB Output is correct
33 Correct 1 ms 340 KB Output is correct
34 Correct 2 ms 340 KB Output is correct
35 Correct 1 ms 340 KB Output is correct
36 Correct 2 ms 340 KB Output is correct
37 Correct 2 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 0 ms 212 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 ms 276 KB Output is correct
16 Correct 0 ms 212 KB Output is correct
17 Correct 0 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 1 ms 212 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 1 ms 212 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
23 Correct 0 ms 212 KB Output is correct
24 Correct 1 ms 212 KB Output is correct
25 Correct 1 ms 212 KB Output is correct
26 Correct 1 ms 212 KB Output is correct
27 Correct 1 ms 212 KB Output is correct
28 Correct 2 ms 340 KB Output is correct
29 Correct 1 ms 340 KB Output is correct
30 Correct 1 ms 340 KB Output is correct
31 Correct 1 ms 340 KB Output is correct
32 Correct 1 ms 340 KB Output is correct
33 Correct 1 ms 340 KB Output is correct
34 Correct 2 ms 340 KB Output is correct
35 Correct 1 ms 340 KB Output is correct
36 Correct 2 ms 340 KB Output is correct
37 Correct 2 ms 340 KB Output is correct
38 Correct 10 ms 1620 KB Output is correct
39 Correct 4 ms 468 KB Output is correct
40 Correct 4 ms 556 KB Output is correct
41 Correct 7 ms 812 KB Output is correct
42 Correct 7 ms 980 KB Output is correct
43 Correct 9 ms 1364 KB Output is correct
44 Correct 11 ms 1600 KB Output is correct
45 Correct 11 ms 1748 KB Output is correct
46 Correct 12 ms 1748 KB Output is correct
47 Correct 11 ms 1748 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 1092 KB Output is correct
2 Correct 9 ms 1364 KB Output is correct
3 Correct 9 ms 1364 KB Output is correct
4 Correct 10 ms 1364 KB Output is correct
5 Correct 7 ms 1076 KB Output is correct
6 Correct 9 ms 1192 KB Output is correct
7 Correct 9 ms 1364 KB Output is correct
8 Correct 10 ms 1364 KB Output is correct
9 Correct 10 ms 1108 KB Output is correct
10 Correct 10 ms 1244 KB Output is correct
11 Correct 10 ms 1364 KB Output is correct
12 Correct 12 ms 1364 KB Output is correct
13 Correct 9 ms 1364 KB Output is correct
14 Correct 12 ms 1364 KB Output is correct
15 Correct 7 ms 1068 KB Output is correct
16 Correct 8 ms 1220 KB Output is correct
17 Correct 13 ms 1364 KB Output is correct
18 Correct 14 ms 1268 KB Output is correct
19 Correct 10 ms 1364 KB Output is correct
20 Correct 10 ms 1364 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 0 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 5 ms 724 KB Output is correct
4 Correct 4 ms 736 KB Output is correct
5 Correct 6 ms 852 KB Output is correct
6 Correct 5 ms 880 KB Output is correct
7 Correct 5 ms 896 KB Output is correct
8 Correct 7 ms 1108 KB Output is correct
9 Correct 8 ms 1288 KB Output is correct
10 Correct 8 ms 1236 KB Output is correct
11 Correct 9 ms 1364 KB Output is correct
12 Correct 9 ms 1344 KB Output is correct
13 Correct 7 ms 1108 KB Output is correct
14 Correct 11 ms 1264 KB Output is correct
15 Correct 10 ms 1364 KB Output is correct
16 Correct 12 ms 1276 KB Output is correct
17 Correct 7 ms 1108 KB Output is correct
18 Correct 9 ms 1364 KB Output is correct
19 Correct 9 ms 1364 KB Output is correct
20 Correct 23 ms 2736 KB Output is correct
21 Correct 22 ms 3140 KB Output is correct
22 Correct 25 ms 3456 KB Output is correct
23 Correct 25 ms 3532 KB Output is correct
24 Correct 21 ms 2776 KB Output is correct
25 Correct 23 ms 3252 KB Output is correct
26 Correct 24 ms 3504 KB Output is correct
27 Correct 32 ms 4552 KB Output is correct
28 Correct 38 ms 5240 KB Output is correct
29 Correct 51 ms 5800 KB Output is correct
30 Correct 43 ms 5944 KB Output is correct
31 Correct 44 ms 6100 KB Output is correct
32 Correct 1 ms 212 KB Output is correct
33 Correct 0 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 32 ms 4616 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 4 ms 724 KB Output is correct
4 Correct 7 ms 1108 KB Output is correct
5 Correct 7 ms 1104 KB Output is correct
6 Correct 7 ms 1108 KB Output is correct
7 Correct 18 ms 2704 KB Output is correct
8 Correct 18 ms 2708 KB Output is correct
9 Correct 32 ms 4568 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 0 ms 212 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 ms 276 KB Output is correct
16 Correct 0 ms 212 KB Output is correct
17 Correct 0 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 1 ms 212 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 1 ms 212 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
23 Correct 0 ms 212 KB Output is correct
24 Correct 1 ms 212 KB Output is correct
25 Correct 1 ms 212 KB Output is correct
26 Correct 1 ms 212 KB Output is correct
27 Correct 1 ms 212 KB Output is correct
28 Correct 2 ms 340 KB Output is correct
29 Correct 1 ms 340 KB Output is correct
30 Correct 1 ms 340 KB Output is correct
31 Correct 1 ms 340 KB Output is correct
32 Correct 1 ms 340 KB Output is correct
33 Correct 1 ms 340 KB Output is correct
34 Correct 2 ms 340 KB Output is correct
35 Correct 1 ms 340 KB Output is correct
36 Correct 2 ms 340 KB Output is correct
37 Correct 2 ms 340 KB Output is correct
38 Correct 10 ms 1620 KB Output is correct
39 Correct 4 ms 468 KB Output is correct
40 Correct 4 ms 556 KB Output is correct
41 Correct 7 ms 812 KB Output is correct
42 Correct 7 ms 980 KB Output is correct
43 Correct 9 ms 1364 KB Output is correct
44 Correct 11 ms 1600 KB Output is correct
45 Correct 11 ms 1748 KB Output is correct
46 Correct 12 ms 1748 KB Output is correct
47 Correct 11 ms 1748 KB Output is correct
48 Correct 7 ms 1092 KB Output is correct
49 Correct 9 ms 1364 KB Output is correct
50 Correct 9 ms 1364 KB Output is correct
51 Correct 10 ms 1364 KB Output is correct
52 Correct 7 ms 1076 KB Output is correct
53 Correct 9 ms 1192 KB Output is correct
54 Correct 9 ms 1364 KB Output is correct
55 Correct 10 ms 1364 KB Output is correct
56 Correct 10 ms 1108 KB Output is correct
57 Correct 10 ms 1244 KB Output is correct
58 Correct 10 ms 1364 KB Output is correct
59 Correct 12 ms 1364 KB Output is correct
60 Correct 9 ms 1364 KB Output is correct
61 Correct 12 ms 1364 KB Output is correct
62 Correct 7 ms 1068 KB Output is correct
63 Correct 8 ms 1220 KB Output is correct
64 Correct 13 ms 1364 KB Output is correct
65 Correct 14 ms 1268 KB Output is correct
66 Correct 10 ms 1364 KB Output is correct
67 Correct 10 ms 1364 KB Output is correct
68 Correct 0 ms 212 KB Output is correct
69 Correct 0 ms 212 KB Output is correct
70 Correct 0 ms 212 KB Output is correct
71 Correct 0 ms 212 KB Output is correct
72 Correct 5 ms 724 KB Output is correct
73 Correct 4 ms 736 KB Output is correct
74 Correct 6 ms 852 KB Output is correct
75 Correct 5 ms 880 KB Output is correct
76 Correct 5 ms 896 KB Output is correct
77 Correct 7 ms 1108 KB Output is correct
78 Correct 8 ms 1288 KB Output is correct
79 Correct 8 ms 1236 KB Output is correct
80 Correct 9 ms 1364 KB Output is correct
81 Correct 9 ms 1344 KB Output is correct
82 Correct 7 ms 1108 KB Output is correct
83 Correct 11 ms 1264 KB Output is correct
84 Correct 10 ms 1364 KB Output is correct
85 Correct 12 ms 1276 KB Output is correct
86 Correct 7 ms 1108 KB Output is correct
87 Correct 9 ms 1364 KB Output is correct
88 Correct 9 ms 1364 KB Output is correct
89 Correct 23 ms 2736 KB Output is correct
90 Correct 22 ms 3140 KB Output is correct
91 Correct 25 ms 3456 KB Output is correct
92 Correct 25 ms 3532 KB Output is correct
93 Correct 21 ms 2776 KB Output is correct
94 Correct 23 ms 3252 KB Output is correct
95 Correct 24 ms 3504 KB Output is correct
96 Correct 32 ms 4552 KB Output is correct
97 Correct 38 ms 5240 KB Output is correct
98 Correct 51 ms 5800 KB Output is correct
99 Correct 43 ms 5944 KB Output is correct
100 Correct 44 ms 6100 KB Output is correct
101 Correct 1 ms 212 KB Output is correct
102 Correct 0 ms 212 KB Output is correct
103 Correct 32 ms 4616 KB Output is correct
104 Correct 0 ms 212 KB Output is correct
105 Correct 4 ms 724 KB Output is correct
106 Correct 7 ms 1108 KB Output is correct
107 Correct 7 ms 1104 KB Output is correct
108 Correct 7 ms 1108 KB Output is correct
109 Correct 18 ms 2704 KB Output is correct
110 Correct 18 ms 2708 KB Output is correct
111 Correct 32 ms 4568 KB Output is correct
112 Correct 0 ms 212 KB Output is correct
113 Correct 0 ms 212 KB Output is correct
114 Correct 38 ms 5224 KB Output is correct
115 Correct 10 ms 1364 KB Output is correct
116 Correct 10 ms 1108 KB Output is correct
117 Correct 25 ms 3568 KB Output is correct
118 Correct 20 ms 2948 KB Output is correct
119 Correct 41 ms 5780 KB Output is correct
120 Correct 44 ms 5748 KB Output is correct
121 Correct 47 ms 5792 KB Output is correct
122 Correct 41 ms 5736 KB Output is correct
123 Correct 32 ms 4552 KB Output is correct
124 Correct 37 ms 5260 KB Output is correct
125 Correct 41 ms 5776 KB Output is correct
126 Correct 41 ms 5832 KB Output is correct
127 Correct 43 ms 5948 KB Output is correct
128 Correct 50 ms 6252 KB Output is correct