Submission #722313

# Submission time Handle Problem Language Result Execution time Memory
722313 2023-04-11T18:09:32 Z FatihSolak Vision Program (IOI19_vision) C++17
44 / 100
90 ms 6968 KB
#include "vision.h"
#include <bits/stdc++.h>
using namespace std;
int pos1 = -1,pos0 = -1;
int calc(int n,int m,int k,int coef){
	vector<int> cands;
	map<int,vector<int>> mp;
	for(int i = 0;i<n;i++){
		for(int j = 0;j<m;j++){
			mp[i+coef*j].push_back(i * m + j);
		}
	}
	for(auto u:mp){
		vector<int> pos;
		for(auto c:mp){
			if(u.first + k < c.first){
				pos.insert(pos.end(),c.second.begin(),c.second.end());
			}
		}
		if(pos.empty())continue;
		int tmp1 = add_or(u.second);
		int tmp2 = add_or(pos);
		cands.push_back(add_and({tmp1,tmp2}));
	}
	if(cands.empty()){
		return pos0;
	}
	return add_or(cands);
}
int get(int n,int m,int k){
	int p1 = calc(n,m,k,1);
	int p2 = calc(n,m,k,-1);
	return add_and({add_not(p1),add_not(p2)});
}
void construct_network(int H, int W, int K) {
	pos1 = add_or({0,add_not(0)});
	pos0 = add_not(pos1);
	int ans1 = get(H,W,K);
	int ans2 = get(H,W,K-1);
	ans2 = add_not(ans2);
	add_and({ans1,ans2});
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 296 KB Output is correct
3 Correct 1 ms 300 KB Output is correct
4 Correct 1 ms 296 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 304 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 300 KB Output is correct
12 Correct 0 ms 212 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 1 ms 296 KB Output is correct
15 Correct 1 ms 300 KB Output is correct
16 Correct 1 ms 304 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 296 KB Output is correct
3 Correct 1 ms 300 KB Output is correct
4 Correct 1 ms 296 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 304 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 300 KB Output is correct
12 Correct 0 ms 212 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 1 ms 296 KB Output is correct
15 Correct 1 ms 300 KB Output is correct
16 Correct 1 ms 304 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 1 ms 304 KB Output is correct
20 Correct 1 ms 300 KB Output is correct
21 Correct 1 ms 300 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
23 Correct 1 ms 300 KB Output is correct
24 Correct 1 ms 212 KB Output is correct
25 Correct 1 ms 212 KB Output is correct
26 Correct 1 ms 212 KB Output is correct
27 Correct 0 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 296 KB Output is correct
3 Correct 1 ms 300 KB Output is correct
4 Correct 1 ms 296 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 304 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 300 KB Output is correct
12 Correct 0 ms 212 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 1 ms 296 KB Output is correct
15 Correct 1 ms 300 KB Output is correct
16 Correct 1 ms 304 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 1 ms 304 KB Output is correct
20 Correct 1 ms 300 KB Output is correct
21 Correct 1 ms 300 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
23 Correct 1 ms 300 KB Output is correct
24 Correct 1 ms 212 KB Output is correct
25 Correct 1 ms 212 KB Output is correct
26 Correct 1 ms 212 KB Output is correct
27 Correct 0 ms 212 KB Output is correct
28 Correct 9 ms 812 KB Output is correct
29 Correct 1 ms 212 KB Output is correct
30 Correct 1 ms 212 KB Output is correct
31 Correct 2 ms 212 KB Output is correct
32 Correct 5 ms 596 KB Output is correct
33 Correct 11 ms 1196 KB Output is correct
34 Correct 7 ms 724 KB Output is correct
35 Correct 5 ms 508 KB Output is correct
36 Correct 2 ms 340 KB Output is correct
37 Correct 1 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 296 KB Output is correct
3 Correct 1 ms 300 KB Output is correct
4 Correct 1 ms 296 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 304 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 300 KB Output is correct
12 Correct 0 ms 212 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 1 ms 296 KB Output is correct
15 Correct 1 ms 300 KB Output is correct
16 Correct 1 ms 304 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 1 ms 304 KB Output is correct
20 Correct 1 ms 300 KB Output is correct
21 Correct 1 ms 300 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
23 Correct 1 ms 300 KB Output is correct
24 Correct 1 ms 212 KB Output is correct
25 Correct 1 ms 212 KB Output is correct
26 Correct 1 ms 212 KB Output is correct
27 Correct 0 ms 212 KB Output is correct
28 Correct 9 ms 812 KB Output is correct
29 Correct 1 ms 212 KB Output is correct
30 Correct 1 ms 212 KB Output is correct
31 Correct 2 ms 212 KB Output is correct
32 Correct 5 ms 596 KB Output is correct
33 Correct 11 ms 1196 KB Output is correct
34 Correct 7 ms 724 KB Output is correct
35 Correct 5 ms 508 KB Output is correct
36 Correct 2 ms 340 KB Output is correct
37 Correct 1 ms 212 KB Output is correct
38 Incorrect 7 ms 4436 KB WA in grader: Too many inputs
39 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 14 ms 1056 KB Output is correct
2 Correct 8 ms 468 KB Output is correct
3 Correct 8 ms 468 KB Output is correct
4 Correct 6 ms 320 KB Output is correct
5 Correct 14 ms 1108 KB Output is correct
6 Correct 9 ms 644 KB Output is correct
7 Correct 8 ms 428 KB Output is correct
8 Correct 5 ms 212 KB Output is correct
9 Correct 13 ms 1100 KB Output is correct
10 Correct 10 ms 724 KB Output is correct
11 Correct 8 ms 468 KB Output is correct
12 Correct 7 ms 468 KB Output is correct
13 Correct 6 ms 340 KB Output is correct
14 Correct 5 ms 212 KB Output is correct
15 Correct 13 ms 1120 KB Output is correct
16 Correct 11 ms 724 KB Output is correct
17 Correct 9 ms 468 KB Output is correct
18 Correct 7 ms 556 KB Output is correct
19 Correct 6 ms 296 KB Output is correct
20 Correct 5 ms 212 KB Output is correct
21 Correct 1 ms 212 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
# 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 90 ms 6968 KB Output is correct
4 Correct 42 ms 4120 KB Output is correct
5 Correct 17 ms 1748 KB Output is correct
6 Correct 6 ms 556 KB Output is correct
7 Correct 4 ms 212 KB Output is correct
8 Incorrect 6 ms 4308 KB WA in grader: Too many inputs
9 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 6 ms 5108 KB WA in grader: Too many inputs
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 296 KB Output is correct
3 Correct 1 ms 300 KB Output is correct
4 Correct 1 ms 296 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 304 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 300 KB Output is correct
12 Correct 0 ms 212 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 1 ms 296 KB Output is correct
15 Correct 1 ms 300 KB Output is correct
16 Correct 1 ms 304 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 1 ms 304 KB Output is correct
20 Correct 1 ms 300 KB Output is correct
21 Correct 1 ms 300 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
23 Correct 1 ms 300 KB Output is correct
24 Correct 1 ms 212 KB Output is correct
25 Correct 1 ms 212 KB Output is correct
26 Correct 1 ms 212 KB Output is correct
27 Correct 0 ms 212 KB Output is correct
28 Correct 9 ms 812 KB Output is correct
29 Correct 1 ms 212 KB Output is correct
30 Correct 1 ms 212 KB Output is correct
31 Correct 2 ms 212 KB Output is correct
32 Correct 5 ms 596 KB Output is correct
33 Correct 11 ms 1196 KB Output is correct
34 Correct 7 ms 724 KB Output is correct
35 Correct 5 ms 508 KB Output is correct
36 Correct 2 ms 340 KB Output is correct
37 Correct 1 ms 212 KB Output is correct
38 Incorrect 7 ms 4436 KB WA in grader: Too many inputs
39 Halted 0 ms 0 KB -