| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 152140 | stefdasca | Vision Program (IOI19_vision) | C++14 | 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> Ns;
Ns = {0, 1};
int a = add_and(Ns);
Ns = {0, a};
int b = add_or(Ns);
Ns = {0, 1, b};
int c = add_xor(Ns);
add_not(c);
*/
int fi = H * W;
int lst = H * W - 1;
for(int i = 0; i < H; ++i)
for(int j = 0; j < W; ++j)
add_not(i * W + j), ++lst;
int fi2 = lst + 1;
int lst2 = lst;
for(int i = 0; i < H; ++i)
for(int j = 0; j < W; ++j)
{
vector<int>vec;
for(int q = 0; q < H; ++q)
for(int z = 0; z < W; ++z)
if(abs(i - q) + abs(j - z) == K)
vec.pb(q * W + z);
add_and({add_and(i * W + j), add_and(vec)});
++lst2;
}
vector<int>s;
for(int i = fi2; i <= lst2; ++i)
s.push_back(i);
add_or(s);
}
