| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 152173 | 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)
{
int query_number = H * W - 1;
for(int i = 0; i < H; ++i)
{
vector<int>pz;
for(int a = i, b = 0; a < H && b < W; ++a, ++b)
pz.push_back(a * W + b);
add_xor(pz);
++query_number;
}
for(int i = 1; i < W; ++i)
{
vector<int>pz;
for(int a = 0, b = i; a < H && b < W; ++a, ++b)
pz.push_back(a * W + b);
add_xor(pz);
++query_number;
}
int q3 = query_number - 1;
for(int i = 0; i < H; ++i)
{
vector<int>pz;
for(int a = 0, b = i; a < H && b >= 0; ++a, --b)
pz.push_back(a * W + b);
add_xor(pz);
++q3;
}
for(int i = 1; i < W; ++i)
{
vector<int>pz;
for(int a = i, b = W - 1; a < H && b >= 0; ++a, --b)
pz.push_back(a * w + b);
add_xor(pz);
++q3;
}
int total = q3;
vector<int>lst;
while(q3 - k > query_number)
{
++total;
lst.push_back(total);
add_and({q3, q3 - K});
--q3;
}
while(query_number - k >= H * W)
{
++total;
lst.push_back(total);
add_and({query_number, query_number - K});
--query_number;
}
add_or(lst);
}
