이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "vision.h"
// #include "grader.cpp"
using namespace std;
int h, w, k;
int get(int x, int y) {
return x * w + y;
}
bool check(int x, int y) {
return (0 <= x && x < h && 0 <= y && y < w);
}
void construct_network(int H, int W, int K) {
h = H; w = W; k = K;
vector <int> v;
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
vector <int> vec;
int x, y;
x = i;
y = j + k;
while (y != j) {
if (check(x, y))
vec.push_back(get(x, y));
x++;
y--;
}
while (x != i) {
if (check(x, y))
vec.push_back(get(x, y));
x--;
y--;
}
if (vec.empty()) continue;
v.push_back(add_and({add_or(vec), get(i, j)}));
}
}
add_or(v);
}
# | 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... |