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>
#define eb emplace_back
using namespace std;
int h, w, k;
int getid(int x, int y){
return x * w + y;
}
void construct_network(int _h, int _w, int _k){
h = _h;
w = _w;
k = _k;
vector<int> all;
for(int i = 0; i < 1; i++){
for(int j = 0; j < 1; j++){
vector<int> tmp;
for(int y = max(j - k, 0); y < w && y <= j + k; y++){
int x;
if(y >= j) x = k + i + j - y;
else x = k + i - j + y;
if(x >= h) continue;
//cerr << i << " " << j << " " << x << " " << y << "\n";
tmp.eb(getid(x, y));
}
if(tmp.empty()) continue;
int a = add_or(tmp);
int b = add_and({getid(i, j), a});
all.eb(b);
}
}
add_or(all);
}
# | 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... |