Submission #834660

#TimeUsernameProblemLanguageResultExecution timeMemory
834660oscar1fVision Program (IOI19_vision)C++17
0 / 100
351 ms1352 KiB
#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 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...