Submission #834662

#TimeUsernameProblemLanguageResultExecution timeMemory
834662oscar1fVision Program (IOI19_vision)C++17
44 / 100
201 ms2480 KiB
#include<bits/stdc++.h> #include "vision.h" using namespace std; const int TAILLE_MAX=200+5; int nbLig,nbCol,dist,idNouv,temp; int pris[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 pris[lig][col]==0) { 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; pris[i][j]=1; } } } add_or(listeRep); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...