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 "bits/stdc++.h"
using namespace std;
#include "vision.h"
#ifndef EVAL
#include "grader.cpp"
#endif
#define ar array
void construct_network(int n, int m, int k) {
vector<ar<int, 2>> d;
for(int i=0;i<=k;i++){
d.push_back({-i, k-i});
d.push_back({-i, i-k});
d.push_back({i, k-i});
d.push_back({i, i-k});
}
sort(d.begin(), d.end());
d.erase(unique(d.begin(), d.end()), d.end());
vector<vector<int>> used(n, vector<int>(m));
vector<int> tot;
for(int i=0;i<1;i++){
for(int j=0;j<1;j++){
used[i][j] = 1;
vector<int> t;
for(auto c : d){
int x = i + c[0], y = j + c[1];
if(0 <= x && x < n && 0 <= y && y < m && !used[x][y]){
t.push_back(x * m + y);
}
}
if(t.empty()) continue;
int k = add_or(t);
k = add_and({i * m + j, k});
tot.push_back(k);
}
}
//~ assert(!tot.empty());
//~ add_or(tot);
}
# | 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... |