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;
int h,w,k;
bool bounds(int y, int x) {
if(y >= 0 && x >= 0 && y < h && x < w) return true;
return false;
}
void construct_network(int H, int W, int K) {
h = H; w = W; k = K;
int index = H*W;
for(int y = 0; y < H; y++) {
for(int x = 0; x < W; x++) {
if(x+y == K) {
add_and({0, y*W + x});
index++;
}
}
}
vector<int> Ns;
for(int i = H*W; i < index; 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... |