| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 644938 | a_aguilo | Vision Program (IOI19_vision) | C++14 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
void construct_network(int H, int W, int K) {
vector<int> possibilities;
for(int i = 0; i < W; ++i){
for(int j = 0; j < H; ++j){
int PosAct = i + j*W;
vector<int> AtDistanceK;
AtDistanceK.push_back(PosAct);
for(int w = 0; w <= K; ++w){
int h = K - w;
if(i + w < W){
if(j + h < H){
AtDistanceK.push_back((j+h)*W + i + w);
}
if(j - h >= 0){
AtDistanceK.push_back((j-h)*W + i + w);
}
}
if(i - w >= 0){
if(j + h < H){
AtDistanceK.push_back((j+h)*W + i - w);
}
if(j - h >= 0){
AtDistanceK.push_back((j-h)*W + i - w);
}
}
}
int hasTwoOnes = add_and({add_or(AtDistanceK), add_not(add_xor(AtDistanceK))});
possibilities.push_back(hasTwoOnes);
}
}
add_or(possibilities);
}
