| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1026743 | ach00 | Vision Program (IOI19_vision) | C++14 | 9 ms | 1960 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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;
vector<int> and_indices;
for(int y = 0; y < H; y++) {
for(int x = 0; x < W; x++) {
vector<int> P;
for(int i = 0; i <= K; i++) {
int fdir = i;
int sdir = K-i;
if(bounds(y+fdir, x+sdir)) P.push_back((y+fdir)*W + x+sdir);
if(bounds(y+fdir, x-sdir)) P.push_back((y+fdir)*W + x-sdir);
if(bounds(y-fdir, x+sdir)) P.push_back((y-fdir)*W + x+sdir);
if(bounds(y-fdir, x-sdir)) P.push_back((y-fdir)*W + x-sdir);
}
add_or(P);
index++;
and_indices.push_back(index);
add_and({y*W + x, index-1});
index++;
}
}
add_or(and_indices);
}| # | 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... | ||||
