Submission #602871

# Submission time Handle Problem Language Result Execution time Memory
602871 2022-07-23T12:03:15 Z Sergio_2357 Vision Program (IOI19_vision) C++17
12 / 100
197 ms 3036 KB
#include "vision.h"
#include <bits/stdc++.h>
using namespace std;

typedef vector<int> vi;

int h, w, k;

int pnt(int x, int y)
{
    return x + (y * w);
}

void construct_network(int H, int W, int K)
{
    h = H;
    w = W;
    k = K;
    vi res;
    for (int i = 0; i < w; i++)
        for (int j = 0; j < h; j++) {
            vi v;
            for (int x = -i; i + x < w; x++)
                for (int y = -j; j + y < h; y++)
                    if (x + y == k)
                        v.push_back(pnt(i + x, j + y));
            if (v.size())
                res.push_back(add_and({ pnt(i, j), add_or(v) }));
        }
    if (res.size())
        add_or(res);
    else
        add_xor({ 0, add_or({ 0 }) });
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 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 Incorrect 0 ms 212 KB on inputs (0, 1), (1, 0), expected 1, but computed 0
7 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 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 Incorrect 0 ms 212 KB on inputs (0, 1), (1, 0), expected 1, but computed 0
7 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 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 Incorrect 0 ms 212 KB on inputs (0, 1), (1, 0), expected 1, but computed 0
7 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 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 Incorrect 0 ms 212 KB on inputs (0, 1), (1, 0), expected 1, but computed 0
7 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 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 1 ms 212 KB Output is correct
6 Correct 1 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 1 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 0 ms 212 KB Output is correct
15 Correct 1 ms 340 KB Output is correct
16 Correct 1 ms 212 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 1 ms 212 KB Output is correct
20 Correct 1 ms 212 KB Output is correct
21 Correct 1 ms 212 KB Output is correct
22 Correct 0 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 20 ms 1344 KB Output is correct
4 Correct 21 ms 1064 KB Output is correct
5 Correct 13 ms 776 KB Output is correct
6 Correct 10 ms 420 KB Output is correct
7 Correct 9 ms 296 KB Output is correct
8 Incorrect 38 ms 1588 KB WA in grader: Too many instructions
9 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 197 ms 3036 KB WA in grader: Too many instructions
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 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 Incorrect 0 ms 212 KB on inputs (0, 1), (1, 0), expected 1, but computed 0
7 Halted 0 ms 0 KB -