This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "vision.h"
#include <bits/stdc++.h>
using namespace std;
#define ar array
void construct_network(int n, int m, int k) {
auto check = [&](int l) {
if (l > n + m - 2) return add_xor({0, 0});
ar<vector<int>, 2> d[n + m - 1];
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
d[i + j][0].push_back(i * m + j);
d[i - j + m - 1][1].push_back(i * m + j);
}
}
vector<int> cands;
ar<vector<int>, 2> A;
for (int i = l; i <= n + m - 2; i++) {
for (auto j : {0, 1}) {
A[j].push_back(add_or(d[i - l][j]));
cands.push_back(add_and({add_or(A[j]), add_or(d[i][j])}));
}
}
return add_or(cands);
};
add_and({check(k), add_not(check(k + 1))});
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |