Submission #1037160

# Submission time Handle Problem Language Result Execution time Memory
1037160 2024-07-28T09:29:51 Z shmax Vision Program (IOI19_vision) C++17
20 / 100
21 ms 1112 KB
#include "vision.h"

#include <bits/stdc++.h>

using namespace std;
#define all(x) x.begin(), x.end()
#define len(x) (int)(x.size())

template<typename T>
using vec = vector<T>;

void construct_network(int H, int W, int K) {
//    std::vector<int> Ns;
//    Ns = {0, 1};
//    int a = add_and(Ns);
//    Ns = {0, a};
//    int b = add_or(Ns);
//    Ns = {0, 1, b};
//    int c = add_xor(Ns);
//    add_not(c);
    vec<int> vals;
    for (int i = 0; i < H; i++) {
        for (int j = 0; j < W; j++) {
            if (i != 0 and j != 0) continue;
            vec<int> index;
            for (int i1 = 0; i1 < H; i1++) {
                for (int j1 = 0; j1 < W; j1++) {
                    if (abs(i1 - i) + abs(j1 - j) == K) {
                        index.push_back({i1 * W + j1});
//                        vals.push_back(add_and({i * W + j, i1 * W + j1}));
                    }
                }
            }
            if (index.empty()) continue;
            int t = add_or(index);
            vals.push_back(add_and({t, i * W + j}));
        }
    }
    add_or(vals);
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Incorrect 1 ms 348 KB on inputs (1, 1), (1, 2), expected 1, but computed 0
8 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Incorrect 1 ms 348 KB on inputs (1, 1), (1, 2), expected 1, but computed 0
8 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Incorrect 1 ms 348 KB on inputs (1, 1), (1, 2), expected 1, but computed 0
8 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Incorrect 1 ms 348 KB on inputs (1, 1), (1, 2), expected 1, but computed 0
8 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 1 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 1 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 1 ms 348 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 1 ms 348 KB Output is correct
19 Correct 0 ms 420 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 2 ms 516 KB Output is correct
10 Correct 2 ms 344 KB Output is correct
11 Correct 3 ms 344 KB Output is correct
12 Correct 1 ms 348 KB Output is correct
13 Correct 0 ms 436 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 1 ms 348 KB Output is correct
19 Correct 1 ms 348 KB Output is correct
20 Correct 5 ms 348 KB Output is correct
21 Correct 8 ms 692 KB Output is correct
22 Correct 6 ms 604 KB Output is correct
23 Correct 5 ms 348 KB Output is correct
24 Correct 5 ms 432 KB Output is correct
25 Correct 7 ms 604 KB Output is correct
26 Correct 4 ms 372 KB Output is correct
27 Correct 12 ms 492 KB Output is correct
28 Correct 21 ms 1036 KB Output is correct
29 Correct 20 ms 1112 KB Output is correct
30 Correct 13 ms 604 KB Output is correct
31 Correct 11 ms 432 KB Output is correct
32 Correct 1 ms 348 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 12 ms 600 KB on inputs (80, 199), (81, 199), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Incorrect 1 ms 348 KB on inputs (1, 1), (1, 2), expected 1, but computed 0
8 Halted 0 ms 0 KB -