Submission #674376

# Submission time Handle Problem Language Result Execution time Memory
674376 2022-12-23T21:02:41 Z stevancv Vision Program (IOI19_vision) C++14
0 / 100
19 ms 2624 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 = 2e5 + 2;
const int mod = 1e9 + 7;
int tsz;
int Solve(int n, int m, int k) {
    vector<vector<int>> a(n + m - 1), b(n + m - 1);
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < m; j++) {
            a[i + j].push_back(i * m + j);
            b[i - j + m - 1].push_back(i * m + j);
        }
    }
    vector<int> aid(n + m - 1), bid(n + m - 1), pa(n + m - 1), pb(n + m - 1);
    for (int i = 0; i < n + m - 1; i++) {
        vector<int> v;
        for (int j : a[i]) v.push_back(j);
        aid[i] = add_xor(v);
        if (i == 0) pa[i] = aid[i];
        else pa[i] = add_or({pa[i - 1], aid[i]});
    }
    for (int i = 0; i < n + m - 1; i++) {
        vector<int> v;
        for (int j : b[i]) v.push_back(j);
        bid[i] = add_xor(v);
        if (i == 0) pb[i] = bid[i];
        else pb[i] = add_or({pb[i - 1], bid[i]});
    }
    vector<int> x;
    for (int i = k; i < n + m - 1; i++) {
        x.push_back(add_and({aid[i], pa[i - k]}));
    }
    for (int i = k; i < n + m - 1; i++) {
        x.push_back(add_and({bid[i], pb[i - k]}));
    }
    return add_or(x);
}
void construct_network(int h, int w, int k) {
    add_xor({Solve(h, w, k), Solve(h, w, k - 1)});
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 540 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 19 ms 2624 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 Incorrect 0 ms 212 KB on inputs (0, 0), (0, 1), expected 1, but computed 0
2 Halted 0 ms 0 KB -