이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "vision.h"
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
int n, m;
void construct_network(int H, int W, int K) {
n = H;
m = W;
int qtd_space = n*m-1;
vector<int> QQ;
for(int i = 0; i < n; i++) {
for(int j = 0; j < m; j++) {
// escolhe uma celula
vector<int> q;
for(int x = i; x < n and x <= i+K; x++) {
// escolhe outra celula em uma linha maior ou igual a i
int y1 = j + i + K - x, y2 = j - i - K + x;
if(0 <= y1 and y1 < m and (x > i or y1 > j)) q.pb(m*x + y1);
if(0 <= y2 and y2 < m and (x > i or y2 > j) and y1 != y2) q.pb(m*x + y2);
}
// y = k + i + j - x
if(!q.empty()) {
add_or(q);
qtd_space++;
add_and({m*i + j, qtd_space});
qtd_space++;
QQ.pb(qtd_space);
}
break;
}
break;
}
add_or(QQ);
}
# | 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... |