Submission #429013

# Submission time Handle Problem Language Result Execution time Memory
429013 2021-06-15T16:39:27 Z Ahmadsm2005 Vision Program (IOI19_vision) C++14
33 / 100
1000 ms 179152 KB
#include "vision.h"
//#include "grader.cpp"
#include<bits/stdc++.h>
using namespace std;
void construct_network(int H,int W,int K){
/*std::vector<int>Ns;
Ns = {0, 1};
int a = add_and(Ns);
Ns = {0, a};
int b = add_or(Ns);
Ns = {0, 1, b};
int c = add_xor(Ns);
add_not(c);*/
vector<int>ADD;
int Z=0;
set<pair<pair<int,int>,pair<int,int>>>lol;
for(int i=0;i<W;i++){
for(int l=0;l<H;l++){
for(int x=0;x<W;x++){
for(int z=0;z<H;z++){
pair<int,int>F={i,l},S={x,z};
if(S>F)
swap(S,F);
if(lol.find({F,S})!=lol.end())
continue;
lol.insert({F,S});
if(abs(i-x)+abs(l-z)==K){
ADD.push_back(i+l*W);
ADD.push_back(x+z*W);
add_and(ADD);
ADD.clear();
Z++;
}
}
}
}
}
for(int i=W*H;i<W*H+Z;i++){
ADD.push_back(i);
}
add_or(ADD);
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 1 ms 204 KB Output is correct
9 Correct 1 ms 204 KB Output is correct
10 Correct 1 ms 204 KB Output is correct
11 Correct 1 ms 204 KB Output is correct
12 Correct 1 ms 204 KB Output is correct
13 Correct 1 ms 204 KB Output is correct
14 Correct 1 ms 204 KB Output is correct
15 Correct 1 ms 204 KB Output is correct
16 Correct 1 ms 204 KB Output is correct
17 Correct 1 ms 204 KB Output is correct
18 Correct 1 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 1 ms 204 KB Output is correct
9 Correct 1 ms 204 KB Output is correct
10 Correct 1 ms 204 KB Output is correct
11 Correct 1 ms 204 KB Output is correct
12 Correct 1 ms 204 KB Output is correct
13 Correct 1 ms 204 KB Output is correct
14 Correct 1 ms 204 KB Output is correct
15 Correct 1 ms 204 KB Output is correct
16 Correct 1 ms 204 KB Output is correct
17 Correct 1 ms 204 KB Output is correct
18 Correct 1 ms 204 KB Output is correct
19 Correct 1 ms 204 KB Output is correct
20 Correct 1 ms 204 KB Output is correct
21 Correct 1 ms 332 KB Output is correct
22 Correct 1 ms 332 KB Output is correct
23 Correct 3 ms 588 KB Output is correct
24 Correct 3 ms 588 KB Output is correct
25 Correct 3 ms 588 KB Output is correct
26 Correct 2 ms 588 KB Output is correct
27 Correct 3 ms 588 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 1 ms 204 KB Output is correct
9 Correct 1 ms 204 KB Output is correct
10 Correct 1 ms 204 KB Output is correct
11 Correct 1 ms 204 KB Output is correct
12 Correct 1 ms 204 KB Output is correct
13 Correct 1 ms 204 KB Output is correct
14 Correct 1 ms 204 KB Output is correct
15 Correct 1 ms 204 KB Output is correct
16 Correct 1 ms 204 KB Output is correct
17 Correct 1 ms 204 KB Output is correct
18 Correct 1 ms 204 KB Output is correct
19 Correct 1 ms 204 KB Output is correct
20 Correct 1 ms 204 KB Output is correct
21 Correct 1 ms 332 KB Output is correct
22 Correct 1 ms 332 KB Output is correct
23 Correct 3 ms 588 KB Output is correct
24 Correct 3 ms 588 KB Output is correct
25 Correct 3 ms 588 KB Output is correct
26 Correct 2 ms 588 KB Output is correct
27 Correct 3 ms 588 KB Output is correct
28 Incorrect 105 ms 19620 KB WA in grader: Too many instructions
29 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 1 ms 204 KB Output is correct
9 Correct 1 ms 204 KB Output is correct
10 Correct 1 ms 204 KB Output is correct
11 Correct 1 ms 204 KB Output is correct
12 Correct 1 ms 204 KB Output is correct
13 Correct 1 ms 204 KB Output is correct
14 Correct 1 ms 204 KB Output is correct
15 Correct 1 ms 204 KB Output is correct
16 Correct 1 ms 204 KB Output is correct
17 Correct 1 ms 204 KB Output is correct
18 Correct 1 ms 204 KB Output is correct
19 Correct 1 ms 204 KB Output is correct
20 Correct 1 ms 204 KB Output is correct
21 Correct 1 ms 332 KB Output is correct
22 Correct 1 ms 332 KB Output is correct
23 Correct 3 ms 588 KB Output is correct
24 Correct 3 ms 588 KB Output is correct
25 Correct 3 ms 588 KB Output is correct
26 Correct 2 ms 588 KB Output is correct
27 Correct 3 ms 588 KB Output is correct
28 Incorrect 105 ms 19620 KB WA in grader: Too many instructions
29 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 7 ms 1484 KB Output is correct
2 Correct 7 ms 1484 KB Output is correct
3 Correct 7 ms 1484 KB Output is correct
4 Correct 7 ms 1484 KB Output is correct
5 Correct 10 ms 1500 KB Output is correct
6 Correct 7 ms 1484 KB Output is correct
7 Correct 8 ms 1484 KB Output is correct
8 Correct 8 ms 1484 KB Output is correct
9 Correct 9 ms 1484 KB Output is correct
10 Correct 8 ms 1484 KB Output is correct
11 Correct 9 ms 1528 KB Output is correct
12 Correct 8 ms 1528 KB Output is correct
13 Correct 7 ms 1516 KB Output is correct
14 Correct 7 ms 1444 KB Output is correct
15 Correct 8 ms 1548 KB Output is correct
16 Correct 8 ms 1484 KB Output is correct
17 Correct 9 ms 1484 KB Output is correct
18 Correct 10 ms 1484 KB Output is correct
19 Correct 8 ms 1484 KB Output is correct
20 Correct 8 ms 1540 KB Output is correct
21 Correct 1 ms 204 KB Output is correct
22 Correct 1 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Execution timed out 1094 ms 175172 KB Time limit exceeded
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1103 ms 179152 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 1 ms 204 KB Output is correct
9 Correct 1 ms 204 KB Output is correct
10 Correct 1 ms 204 KB Output is correct
11 Correct 1 ms 204 KB Output is correct
12 Correct 1 ms 204 KB Output is correct
13 Correct 1 ms 204 KB Output is correct
14 Correct 1 ms 204 KB Output is correct
15 Correct 1 ms 204 KB Output is correct
16 Correct 1 ms 204 KB Output is correct
17 Correct 1 ms 204 KB Output is correct
18 Correct 1 ms 204 KB Output is correct
19 Correct 1 ms 204 KB Output is correct
20 Correct 1 ms 204 KB Output is correct
21 Correct 1 ms 332 KB Output is correct
22 Correct 1 ms 332 KB Output is correct
23 Correct 3 ms 588 KB Output is correct
24 Correct 3 ms 588 KB Output is correct
25 Correct 3 ms 588 KB Output is correct
26 Correct 2 ms 588 KB Output is correct
27 Correct 3 ms 588 KB Output is correct
28 Incorrect 105 ms 19620 KB WA in grader: Too many instructions
29 Halted 0 ms 0 KB -