# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
721476 | nguyentunglam | Vision Program (IOI19_vision) | C++17 | 199 ms | 2312 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "vision.h"
#include<bits/stdc++.h>
using namespace std;
const int N = 200 + 10;
int row[N], col[N];
void construct_network(int h, int w, int K) {
vector<int> lst;
if (K == 1) {
for(int i = 0; i < h; i++) {
vector<int> ask;
for(int j = 0; j < w; j++) ask.push_back(i * w + j);
row[i] = add_or(ask);
}
for(int j = 0; j < w; j++) {
vector<int> ask;
for(int i = 0; i < h; i++) ask.push_back(i * w + j);
col[j] = add_or(ask);
}
vector<int> R, C;
for(int i = 0; i < h; i++) R.push_back(row[i]);
for(int j = 1; j < w; j++) C.push_back(add_and({col[j], col[j - 1]}));
if (!R.empty() && !C.empty()) {
int ret = add_and({add_xor(R), add_or(C)});
lst.push_back(ret);
}
R.clear(); C.clear();
for(int j = 0; j < w; j++) C.push_back(col[j]);
for(int i = 1; i < h; i++) R.push_back(add_and({row[i - 1], row[i]}));
if (!R.empty() && !C.empty()) {
int ret = add_and({add_xor(C), add_or(R)});
lst.push_back(ret);
}
int ok = add_or(lst);
}
for(int i = 0; i < h; i++) for(int j = 0; j < w; j++) {
vector<int> ask;
for(int k = i; k < h; k++) for(int l = 0; l < w; l++) {
if (i == k && j > l) continue;
if (abs(i - k) + abs(j - l) == K) ask.push_back(k * w + l);
}
if (ask.empty()) continue;
lst.push_back(add_and({i * w + j, add_or(ask)}));
}
if (lst.empty()) return;
add_or(lst);
}
컴파일 시 표준 에러 (stderr) 메시지
# | 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... |