Submission #823852

# Submission time Handle Problem Language Result Execution time Memory
823852 2023-08-13T08:49:26 Z vjudge1 Vision Program (IOI19_vision) C++17
0 / 100
1 ms 976 KB
#include "vision.h"
#include <bits/stdc++.h>

using namespace std;

void construct_network(int H, int W, int K) {
    int a = -1, b = -1, x = -1, y = -1, c = 0, z;
    for(int i = 0; i < H; ++ i) {
        for(int j = 0; j < W; ++ j) {
            if(c == 10000) {
                break;
            }
            ++ c;
            if(!add_not(i * W + j)) {
                if(a == -1) {
                    a = i, b = j;
                } else {
                    x = i, y = j;
                }
            }
        }
    }
    if(x == -1) {
        x = H - 1, y = W - 1;
    }
    z = abs(x - a) + abs(y - b);
    if(K == z) {
        if(a||b) {
            add_not(0);
        } else if(x != 0 && y != 1) {
            add_not(1);
        } else {
            add_not(2);
        }
    } else {
        if(a != -1) {
            add_not(a * W + b);
        } else {
            add_and({0});
        }
    }
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB on inputs (0, 0), (1, 1), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 976 KB WA in grader: Too many instructions
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -