This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "vision.h"
#include <cmath>
#include <vector>
#include <algorithm>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> v2i;
typedef pair<int, int> pi;
#define pb push_back
#define mp make_pair
#define rep(i, n) for (int i = 0; i < n; i++)
void construct_network(int H, int W, int K) {
vi finalouts;
rep(i, K + 1) {
rep(x, W+i-K) {
rep(y, H - i) {
finalouts.pb(add_and({ x + y*W, (x+K-i) + (y+i)*W }));
}
}
}
rep(i, K) {
for (int x = K-i; x < W; x++)
{
rep(y, H - i) {
finalouts.pb(add_and({ x + y*W, (x + i - K) + (y + i)*W }));
}
}
}
add_or(finalouts);
}
# | 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... |