이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "vision.h"
#include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define pb push_back
#define all(x) x.begin(), x.end()
#define allr(x) x.rbegin(), x.rend()
#define mp make_pair
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef complex<double> cd;
void construct_network(int H, int W, int K) {
vector<int> fin;
for(int i=0;i<H;i++){
for(int j=0;j<W;j++){
vector<int> aux;
for(int hor=0;hor<=K;hor++){
int ver=K-hor;
if(i+ver<H && j+hor<W) aux.pb((i+ver)*W+j+hor);
if(i+ver<H && j-hor>=0) aux.pb((i+ver)*W+j-hor);
if(i-ver>=0 && j+hor<W) aux.pb((i-ver)*W+j+hor);
if(i-ver>=0 && j-hor>=0) aux.pb((i-ver)*W+j-hor);
}
if(!aux.empty()){
int curr=add_or(aux);
fin.pb(add_and({i*W+j, curr}));
}
}
}
add_or(fin);
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |