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<bits/stdc++.h>
using namespace std;
void construct_network(int H, int W, int K) {
vector<int> finalAnswer;
if(H * W <= 200){
for(int i = 0; i < H * W; i++){
for(int j = i + 1; j < H * W; j++){
int xi = i / W, yi = i % W;
int xj = j / W, yj = j % W;
vector<int> question (2);
question[0] = i;
question[1] = j;
if(abs(xi - xj) + abs(yi - yj) == K) finalAnswer.push_back(add_and(question));
}
}
}
else{
for(int i = 0; i < H * W; i++){
int xi = i / W, yi = i % W;
if(xi + yi == K) finalAnswer.push_back(i);
}
}
add_or(finalAnswer);
}
# | 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... |