이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "vision.h"
#include <stdio.h>
#include <vector>
#include <queue>
#include <algorithm>
#include <iostream>
#include <string>
#include <bitset>
#include <map>
#include <set>
#include <tuple>
#include <string.h>
#include <math.h>
#include <random>
#include <functional>
#include <assert.h>
#include <math.h>
#define all(x) (x).begin(), (x).end()
#define xx first
#define yy second
using namespace std;
using i64 = long long int;
using ii = pair<int, int>;
using ii64 = pair<i64, i64>;
void construct_network(int H, int W, int K) {
int inst = 0;
for (int y1 = 0; y1 < H; y1++)
{
for (int x1 = 0; x1 < W; x1++)
{
int a = y1 * W + x1;
for (int y2 = 0; y2 < H; y2++)
{
for (int x2 = 0; x2 < W; x2++)
{
if (abs(x1 - x2) + abs(y1 - y2) != K)
continue;
int b = y2 * W + x2;
add_and({ a, b });
inst++;
}
}
}
}
vector<int> ors;
for (int i = 0; i < inst; i++)
ors.push_back(H * W + i);
add_or(ors);
}
# | 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... |