이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "vision.h"
#include <bits/stdc++.h>
using namespace std;
void construct_network(int H, int W, int K)
{
vector<int> rw(H), cl(W);
vector<int> conw(H - 1), conc(W - 1);
for (int i = 0; i < H; i++)
{
vector<int> v;
for (int j = 0; j < W; j++) v.push_back(i * W + j);
rw[i] = add_xor(v);
if (i) conw[i - 1] = add_and({rw[i], rw[i - 1]});
}
for (int j = 0; j < W; j++)
{
vector<int> v;
for (int i = 0; i < H; i++) v.push_back(i * W + j);
cl[j] = add_xor(v);
if (j) conc[j - 1] = add_and({cl[j], cl[j - 1]});
}
int A = add_or(rw), B = add_or(cl);
int x = add_and({add_not(A), add_or(conc)});
int y = add_and({add_not(B), add_or(conw)});
add_or({x, y});
}
# | 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... |