# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
416721 | peuch | Vision Program (IOI19_vision) | C++17 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "vision.h"
#include<bits/stdc++.h>
using namespace std;
void construct_network(int H, int W, int K) {
vector<int> finalAnswer;
if(H * W <= 200){
for(int i = 0; i < H * W; i++){
for(int j = i + 1; j < H * W; j++){
int xi = i / W, yi = i % W;
int xj = j / W, yj = j % W;
vector<int> question (2);
question[0] = i;
question[1] = j;
if(abs(xi - xj) + abs(yi - yj) == K) finalAnswer.push_back(add_and(question));
}
}
}
else{
for(int i = 0; i < H * W; i++){
int xi = i / W, yi = i % W;
if(xi + yi == k) finalAnswer.push(i);
}
}
add_or(finalAnswer);
}