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;
const int TAILLE_MAX=200+5;
int nbLig,nbCol,dist,idNouv,temp;
int pasPris[TAILLE_MAX][TAILLE_MAX];
vector<int> vois;
vector<int> listeRep;
void construct_network(int H, int W, int K) {
nbLig=H;
nbCol=W;
dist=K;
idNouv=nbLig*nbCol;
for (int i=0;i<nbLig;i++) {
for (int j=0;j<nbCol;j++) {
vois.clear();
for (int lig=0;lig<nbLig;lig++) {
for (int col=0;col<nbCol;col++) {
if (abs(lig-i)+abs(col-j)==dist and pasPris[lig][col]==1) {
vois.push_back(lig*nbCol+col);
}
}
}
if (!vois.empty()) {
temp=add_or(vois);
temp=add_and({i*nbCol+j,idNouv});
listeRep.push_back(idNouv+1);
idNouv+=2;
}
else {
pasPris[i][j]=1;
}
}
}
add_or(listeRep);
}
# | 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... |