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;
typedef vector<int> vi;
void construct_network(int h, int w, int k){
int ans=0;
for(int i=0; i<h; i++){
for(int j=i; j<w; j++){
int x1,x2;
int y1,y2;
x1=i/w;
y1=i%w;
x2=j/w;
y2=j%w;
if(abs(x2-x1) + abs(y2-y1) == k){
vi ns = {i,j};
add_and(ns);
ans++;
}
}
}
vi ora;
for(int i=h*w; i<=h*w+ans; i++){
ora.push_back(i);
}
add_or(ora);
}
# | 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... |