#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 |
1 |
Incorrect |
1 ms |
212 KB |
on inputs (0, 1), (0, 2), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
on inputs (0, 1), (0, 2), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
on inputs (0, 1), (0, 2), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
on inputs (0, 1), (0, 2), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
on inputs (0, 1), (0, 2), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
9 ms |
596 KB |
Output is correct |
4 |
Correct |
11 ms |
724 KB |
Output is correct |
5 |
Correct |
13 ms |
852 KB |
Output is correct |
6 |
Correct |
10 ms |
596 KB |
Output is correct |
7 |
Correct |
8 ms |
340 KB |
Output is correct |
8 |
Correct |
35 ms |
836 KB |
Output is correct |
9 |
Correct |
45 ms |
1352 KB |
Output is correct |
10 |
Correct |
43 ms |
1224 KB |
Output is correct |
11 |
Correct |
39 ms |
748 KB |
Output is correct |
12 |
Correct |
32 ms |
340 KB |
Output is correct |
13 |
Correct |
1 ms |
336 KB |
Output is correct |
14 |
Correct |
0 ms |
212 KB |
Output is correct |
15 |
Correct |
0 ms |
212 KB |
Output is correct |
16 |
Correct |
0 ms |
212 KB |
Output is correct |
17 |
Correct |
1 ms |
468 KB |
Output is correct |
18 |
Correct |
0 ms |
340 KB |
Output is correct |
19 |
Correct |
1 ms |
340 KB |
Output is correct |
20 |
Incorrect |
195 ms |
1304 KB |
WA in grader: Too many instructions |
21 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
351 ms |
1212 KB |
WA in grader: Too many instructions |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
on inputs (0, 1), (0, 2), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |