# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1025395 | 2024-07-17T01:30:56 Z | LeaRouse | Vision Program (IOI19_vision) | C++14 | 1000 ms | 10300 KB |
#include <bits/stdc++.h> #include "vision.h" #define fastio ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define ll long long #define ff first #define ss second using namespace std; const int MAX=2e5+5; ll P[MAX],bit[MAX],d=0; void construct_network(int h,int w,int k){ vector<int>v[MAX]; bool awa=false; for(int i=0;i<w*h;i++){ int a=i/w; int b=i-w*a; for(int j=i+1;j<w*h;j++){ int c=j/w; int d=j-w*c; if(abs(a-c)+abs(b-d)==k){ v[i].push_back(j); } } } int a=0; vector<int>res; for(int i=0;i<h*w;i++){ if(v[i].size()){ add_or(v[i]); vector<int>r; r.push_back(a+w*h); r.push_back(i); a++; add_and(r); res.push_back(a+w*h); a++; } } add_or(res); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 4956 KB | Output is correct |
2 | Correct | 3 ms | 4956 KB | Output is correct |
3 | Correct | 3 ms | 4956 KB | Output is correct |
4 | Correct | 3 ms | 4956 KB | Output is correct |
5 | Correct | 3 ms | 4952 KB | Output is correct |
6 | Correct | 3 ms | 4956 KB | Output is correct |
7 | Correct | 3 ms | 4956 KB | Output is correct |
8 | Correct | 3 ms | 5132 KB | Output is correct |
9 | Correct | 4 ms | 5208 KB | Output is correct |
10 | Correct | 3 ms | 5208 KB | Output is correct |
11 | Correct | 3 ms | 4956 KB | Output is correct |
12 | Correct | 3 ms | 5092 KB | Output is correct |
13 | Correct | 3 ms | 4956 KB | Output is correct |
14 | Correct | 3 ms | 4956 KB | Output is correct |
15 | Correct | 3 ms | 4956 KB | Output is correct |
16 | Correct | 3 ms | 5120 KB | Output is correct |
17 | Correct | 3 ms | 4956 KB | Output is correct |
18 | Correct | 3 ms | 4952 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 4956 KB | Output is correct |
2 | Correct | 3 ms | 4956 KB | Output is correct |
3 | Correct | 3 ms | 4956 KB | Output is correct |
4 | Correct | 3 ms | 4956 KB | Output is correct |
5 | Correct | 3 ms | 4952 KB | Output is correct |
6 | Correct | 3 ms | 4956 KB | Output is correct |
7 | Correct | 3 ms | 4956 KB | Output is correct |
8 | Correct | 3 ms | 5132 KB | Output is correct |
9 | Correct | 4 ms | 5208 KB | Output is correct |
10 | Correct | 3 ms | 5208 KB | Output is correct |
11 | Correct | 3 ms | 4956 KB | Output is correct |
12 | Correct | 3 ms | 5092 KB | Output is correct |
13 | Correct | 3 ms | 4956 KB | Output is correct |
14 | Correct | 3 ms | 4956 KB | Output is correct |
15 | Correct | 3 ms | 4956 KB | Output is correct |
16 | Correct | 3 ms | 5120 KB | Output is correct |
17 | Correct | 3 ms | 4956 KB | Output is correct |
18 | Correct | 3 ms | 4952 KB | Output is correct |
19 | Correct | 3 ms | 4956 KB | Output is correct |
20 | Correct | 3 ms | 5092 KB | Output is correct |
21 | Correct | 3 ms | 4956 KB | Output is correct |
22 | Correct | 3 ms | 4952 KB | Output is correct |
23 | Correct | 3 ms | 5048 KB | Output is correct |
24 | Correct | 3 ms | 4956 KB | Output is correct |
25 | Correct | 3 ms | 5124 KB | Output is correct |
26 | Correct | 3 ms | 4952 KB | Output is correct |
27 | Correct | 5 ms | 4956 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 4956 KB | Output is correct |
2 | Correct | 3 ms | 4956 KB | Output is correct |
3 | Correct | 3 ms | 4956 KB | Output is correct |
4 | Correct | 3 ms | 4956 KB | Output is correct |
5 | Correct | 3 ms | 4952 KB | Output is correct |
6 | Correct | 3 ms | 4956 KB | Output is correct |
7 | Correct | 3 ms | 4956 KB | Output is correct |
8 | Correct | 3 ms | 5132 KB | Output is correct |
9 | Correct | 4 ms | 5208 KB | Output is correct |
10 | Correct | 3 ms | 5208 KB | Output is correct |
11 | Correct | 3 ms | 4956 KB | Output is correct |
12 | Correct | 3 ms | 5092 KB | Output is correct |
13 | Correct | 3 ms | 4956 KB | Output is correct |
14 | Correct | 3 ms | 4956 KB | Output is correct |
15 | Correct | 3 ms | 4956 KB | Output is correct |
16 | Correct | 3 ms | 5120 KB | Output is correct |
17 | Correct | 3 ms | 4956 KB | Output is correct |
18 | Correct | 3 ms | 4952 KB | Output is correct |
19 | Correct | 3 ms | 4956 KB | Output is correct |
20 | Correct | 3 ms | 5092 KB | Output is correct |
21 | Correct | 3 ms | 4956 KB | Output is correct |
22 | Correct | 3 ms | 4952 KB | Output is correct |
23 | Correct | 3 ms | 5048 KB | Output is correct |
24 | Correct | 3 ms | 4956 KB | Output is correct |
25 | Correct | 3 ms | 5124 KB | Output is correct |
26 | Correct | 3 ms | 4952 KB | Output is correct |
27 | Correct | 5 ms | 4956 KB | Output is correct |
28 | Correct | 5 ms | 5468 KB | Output is correct |
29 | Correct | 3 ms | 4956 KB | Output is correct |
30 | Correct | 3 ms | 4952 KB | Output is correct |
31 | Correct | 3 ms | 4952 KB | Output is correct |
32 | Correct | 4 ms | 5208 KB | Output is correct |
33 | Correct | 4 ms | 5212 KB | Output is correct |
34 | Correct | 5 ms | 5468 KB | Output is correct |
35 | Correct | 5 ms | 5348 KB | Output is correct |
36 | Correct | 4 ms | 4956 KB | Output is correct |
37 | Correct | 4 ms | 4956 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 4956 KB | Output is correct |
2 | Correct | 3 ms | 4956 KB | Output is correct |
3 | Correct | 3 ms | 4956 KB | Output is correct |
4 | Correct | 3 ms | 4956 KB | Output is correct |
5 | Correct | 3 ms | 4952 KB | Output is correct |
6 | Correct | 3 ms | 4956 KB | Output is correct |
7 | Correct | 3 ms | 4956 KB | Output is correct |
8 | Correct | 3 ms | 5132 KB | Output is correct |
9 | Correct | 4 ms | 5208 KB | Output is correct |
10 | Correct | 3 ms | 5208 KB | Output is correct |
11 | Correct | 3 ms | 4956 KB | Output is correct |
12 | Correct | 3 ms | 5092 KB | Output is correct |
13 | Correct | 3 ms | 4956 KB | Output is correct |
14 | Correct | 3 ms | 4956 KB | Output is correct |
15 | Correct | 3 ms | 4956 KB | Output is correct |
16 | Correct | 3 ms | 5120 KB | Output is correct |
17 | Correct | 3 ms | 4956 KB | Output is correct |
18 | Correct | 3 ms | 4952 KB | Output is correct |
19 | Correct | 3 ms | 4956 KB | Output is correct |
20 | Correct | 3 ms | 5092 KB | Output is correct |
21 | Correct | 3 ms | 4956 KB | Output is correct |
22 | Correct | 3 ms | 4952 KB | Output is correct |
23 | Correct | 3 ms | 5048 KB | Output is correct |
24 | Correct | 3 ms | 4956 KB | Output is correct |
25 | Correct | 3 ms | 5124 KB | Output is correct |
26 | Correct | 3 ms | 4952 KB | Output is correct |
27 | Correct | 5 ms | 4956 KB | Output is correct |
28 | Correct | 5 ms | 5468 KB | Output is correct |
29 | Correct | 3 ms | 4956 KB | Output is correct |
30 | Correct | 3 ms | 4952 KB | Output is correct |
31 | Correct | 3 ms | 4952 KB | Output is correct |
32 | Correct | 4 ms | 5208 KB | Output is correct |
33 | Correct | 4 ms | 5212 KB | Output is correct |
34 | Correct | 5 ms | 5468 KB | Output is correct |
35 | Correct | 5 ms | 5348 KB | Output is correct |
36 | Correct | 4 ms | 4956 KB | Output is correct |
37 | Correct | 4 ms | 4956 KB | Output is correct |
38 | Incorrect | 123 ms | 10300 KB | WA in grader: Too many instructions |
39 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 4956 KB | Output is correct |
2 | Correct | 3 ms | 4956 KB | Output is correct |
3 | Correct | 3 ms | 4956 KB | Output is correct |
4 | Correct | 3 ms | 4956 KB | Output is correct |
5 | Correct | 3 ms | 4956 KB | Output is correct |
6 | Correct | 3 ms | 4956 KB | Output is correct |
7 | Correct | 3 ms | 4956 KB | Output is correct |
8 | Correct | 3 ms | 5052 KB | Output is correct |
9 | Correct | 3 ms | 4956 KB | Output is correct |
10 | Correct | 5 ms | 4956 KB | Output is correct |
11 | Correct | 3 ms | 4956 KB | Output is correct |
12 | Correct | 3 ms | 4956 KB | Output is correct |
13 | Correct | 3 ms | 4956 KB | Output is correct |
14 | Correct | 4 ms | 5048 KB | Output is correct |
15 | Correct | 3 ms | 4956 KB | Output is correct |
16 | Correct | 3 ms | 5176 KB | Output is correct |
17 | Correct | 4 ms | 4956 KB | Output is correct |
18 | Correct | 3 ms | 4956 KB | Output is correct |
19 | Correct | 3 ms | 4956 KB | Output is correct |
20 | Correct | 3 ms | 4956 KB | Output is correct |
21 | Correct | 3 ms | 4956 KB | Output is correct |
22 | Correct | 3 ms | 4956 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 4956 KB | Output is correct |
2 | Correct | 3 ms | 4956 KB | Output is correct |
3 | Correct | 14 ms | 5692 KB | Output is correct |
4 | Correct | 17 ms | 6420 KB | Output is correct |
5 | Correct | 15 ms | 5908 KB | Output is correct |
6 | Correct | 13 ms | 5212 KB | Output is correct |
7 | Correct | 12 ms | 4956 KB | Output is correct |
8 | Incorrect | 43 ms | 6084 KB | WA in grader: Too many instructions |
9 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1100 ms | 5380 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 4956 KB | Output is correct |
2 | Correct | 3 ms | 4956 KB | Output is correct |
3 | Correct | 3 ms | 4956 KB | Output is correct |
4 | Correct | 3 ms | 4956 KB | Output is correct |
5 | Correct | 3 ms | 4952 KB | Output is correct |
6 | Correct | 3 ms | 4956 KB | Output is correct |
7 | Correct | 3 ms | 4956 KB | Output is correct |
8 | Correct | 3 ms | 5132 KB | Output is correct |
9 | Correct | 4 ms | 5208 KB | Output is correct |
10 | Correct | 3 ms | 5208 KB | Output is correct |
11 | Correct | 3 ms | 4956 KB | Output is correct |
12 | Correct | 3 ms | 5092 KB | Output is correct |
13 | Correct | 3 ms | 4956 KB | Output is correct |
14 | Correct | 3 ms | 4956 KB | Output is correct |
15 | Correct | 3 ms | 4956 KB | Output is correct |
16 | Correct | 3 ms | 5120 KB | Output is correct |
17 | Correct | 3 ms | 4956 KB | Output is correct |
18 | Correct | 3 ms | 4952 KB | Output is correct |
19 | Correct | 3 ms | 4956 KB | Output is correct |
20 | Correct | 3 ms | 5092 KB | Output is correct |
21 | Correct | 3 ms | 4956 KB | Output is correct |
22 | Correct | 3 ms | 4952 KB | Output is correct |
23 | Correct | 3 ms | 5048 KB | Output is correct |
24 | Correct | 3 ms | 4956 KB | Output is correct |
25 | Correct | 3 ms | 5124 KB | Output is correct |
26 | Correct | 3 ms | 4952 KB | Output is correct |
27 | Correct | 5 ms | 4956 KB | Output is correct |
28 | Correct | 5 ms | 5468 KB | Output is correct |
29 | Correct | 3 ms | 4956 KB | Output is correct |
30 | Correct | 3 ms | 4952 KB | Output is correct |
31 | Correct | 3 ms | 4952 KB | Output is correct |
32 | Correct | 4 ms | 5208 KB | Output is correct |
33 | Correct | 4 ms | 5212 KB | Output is correct |
34 | Correct | 5 ms | 5468 KB | Output is correct |
35 | Correct | 5 ms | 5348 KB | Output is correct |
36 | Correct | 4 ms | 4956 KB | Output is correct |
37 | Correct | 4 ms | 4956 KB | Output is correct |
38 | Incorrect | 123 ms | 10300 KB | WA in grader: Too many instructions |
39 | Halted | 0 ms | 0 KB | - |