# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
165962 | nickmet2004 | Vision Program (IOI19_vision) | C++14 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
int h , w , k;
vector<int> Dl[400500] , Dr[400500];
int solve(int h , int w , int K){
for(int i = 0; i < h; ++i){
for(int j = 0; j < w; ++j){
// emplace back the elements on diagonals , position off memory array
Dl[i - j].push_back(i * w + j);
Dr[i + j + h - 1].push_back(i * w + j);
}
}
vector<int> DiagLor , DiagRor , ans;
for(int i = 0; i <= h + w - 2; ++i){
DiagLor.push_back(add_or(Dl[i]));
DiagRor.emplace_back(add_or(Dr[i]));
if(i >= K){
ans.push_back( add_and ( { DiagLor[i] , DiagLor[i - K] } ) );
ans.push_back( add_and ( { DiagRor[i] , DiagRor[i - K] } ) );
}
}
return add_or(ans);
}
void construct_network(int H , int W , int K){
if(H + W - 2 == K){
solve(H , W , K);
} else {
add_xor( { solve(H , W , K) , solve(H , W , K + 1) } );
}
}
int main(){}