Submission #654815

# Submission time Handle Problem Language Result Execution time Memory
654815 2022-11-01T17:29:18 Z stevancv Vision Program (IOI19_vision) C++14
0 / 100
2 ms 516 KB
#include <bits/stdc++.h>
#include "vision.h"
#define ll long long
#define ld long double
#define sp ' '
#define en '\n'
#define smin(a, b) a = min(a, b)
#define smax(a, b) a = max(a, b)
using namespace std;
const int N = 1e5 + 2;
void construct_network(int n, int m, int k) {
    auto Convert = [&] (int x, int y) {
        return x * m + y;
    };
    for (int i = 0; i < n; i++) {
        vector<int> a;
        for (int j = 0; j < m; j++) a.push_back(Convert(i, j));
        if (!add_or(a)) continue;
        int j = -1;
        for (int z = 0; z < m; z++) {
            if (!add_not(Convert(i, z))) {
                j = z;
                break;
            }
        }
      	assert(j != -1);
        a.clear();
        for (int r = i; r <= min(n - 1, i + k); r++) {
            int u = k - r + i;
            if (j - u >= 0) a.push_back(Convert(r, j - u));
            if (j + u < m) a.push_back(Convert(r, j + u));
        }
        add_or(a);
        return;
    }
}
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 516 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 516 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 516 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 516 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 428 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 340 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 428 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 516 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -