이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#pragma GCC optimize("O1,O2,O3,Ofast,unroll-loops")
#include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define pb push_back
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<int> vi;
#include "vision.h"
int H, W, K;
ii conv(int x) {
return {x / W, x % W};
}
int dist(int x, int y) {
ii r1 = conv(x);
ii r2 = conv(y);
int res = abs(r1.fi - r2.fi) + abs(r1.se - r2.se);
return res;
}
void construct_network(int h, int w, int k) {
H = h; W = w; K = k;
/* vi Ns;
Ns = {0, 5};
int a = add_and(Ns);
Ns = {2, 3};
int b = add_and(Ns);
Ns = {6, 7};
add_or(Ns);*/
int ctr = 0;
for (int i = 0; i < 1; i++) {
for (int j = i + 1; j < H * W; j++) {
if (dist(i, j) == K) {
add_and({i, j});
ctr++;
}
}
}
vi tq;
for (int i = H * W; i < H * W + ctr; i++) {
tq.pb(i);
}
add_or(tq);
}
# | 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... |