이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "vision.h"
#include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define m_p make_pair
#define all(x) (x).begin(),(x).end()
#define sz(x) ((int)(x).size())
typedef long long ll;
const int N = 202;
int n, m;
void construct_network(int H, int W, int K)
{
n = H;
m = W;
if (max(n, m) <= 10 || min(n, m) == 1)
{
vector<int> v;
for (int x1 = 0; x1 < n; ++x1)
{
for (int y1_ = 0; y1_ < m; ++y1_)
{
for (int x2 = 0; x2 < n; ++x2)
{
for (int y2 = 0; y2 < m; ++y2)
{
if (abs(x1 - x2) + abs(y1_ - y2) == K)
{
if (m_p(x1, y1_) < m_p(x2, y2))
{
v.push_back(add_and({x1 * m + y1_, x2 * m + y2}));
}
}
}
}
}
}
add_or(v);
}
else
{
vector<int> v;
for (int x1 = 0; x1 < 1; ++x1)
{
for (int y1_ = 0; y1_ < 1; ++y1_)
{
for (int x2 = 0; x2 < n; ++x2)
{
for (int y2 = 0; y2 < m; ++y2)
{
if (abs(x1 - x2) + abs(y1_ - y2) == K)
{
if (m_p(x1, y1_) < m_p(x2, y2))
{
v.push_back(add_and({x1 * m + y1_, x2 * m + y2}));
}
}
}
}
}
}
add_or(v);
}
}
# | 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... |