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>
#include "vision.h"
using namespace std;
void construct_network(int h, int w, int k){
int total = h * w;
for(int i = 0; i < h * w; i++){
for(int j = i + 1; j < h * w; j++){
if(abs(i / w - j / w) + abs(i % w - j % w) == k){
add_and({i, j}); total++;
}
}
vector<int> ans;
for(int i = h * w; i < total; i++) ans.push_back(i);
add_or(ans);
}
}
# | 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... |