# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
293404 | Dovran | Vision Program (IOI19_vision) | C++14 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define N 100009
#define pii pair <int, int>
#define ff first
#define ss second
#define sz size
#define pb push_back
#define ll long long
using namespace std;
void construct_network(int n, int m, int k){
if(k!=1)
{
vector<int>e;
for(int i=0; i<n; i++){
for(int j=0; j<m; j++){
if(i+j==k)
e.pb(i*m+j);
}
}
add_or(e);
return;
}
vector<int>a, b, c, d;
for(int i=0; i<n; i++){
vector<int>e;
for(int j=0; j<m; j++)
e.pb(i*m+j);
a.pb(add_or(e));
}
for(int j=0; j<m; j++){
vector<int>e;
for(int i=0; i<n; i++)
e.pb(i*m+j);
c.pb(add_or(e));
}
for(int i=0; i<a.sz()-1; i++)
b.pb(add_and({a[i], a[i+1]}));
for(int i=0; i<c.sz()-1; i++)
b.pb(add_and({c[i], c[i+1]}));
for(auto i:c)
a.pb(i);
int x=add_xor(a);
int y=add_xor(b);
add_and({x, y});
}