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;
void construct_network(int H, int W, int K) {
vector<int>Ns;
int cnt = 0;
for(int i=0; i<H; ++i) {
for(int j=0; j<W; ++j) {
for(int k=0; k<H; ++k) {
for(int l=0; l<W; ++l) {
if(abs(i-k) + abs(j-l)==K) {
if(make_pair(i, j) < make_pair(k, l)) {
++cnt;
Ns = {i * W + j, k * W + l};
add_and(Ns);
}
}
}
}
}
}
Ns = {};
for(int i=H*W; i<H*W+cnt; ++i) {
Ns.push_back(i);
}
add_or(Ns);
}
# | 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... |