Submission #612713

# Submission time Handle Problem Language Result Execution time Memory
612713 2022-07-29T21:44:05 Z morete Vision Program (IOI19_vision) C++17
Compilation error
0 ms 0 KB
void construct_network(int H, int W, int K) {
	int ct = 0;
	
		for(int i = 0; i + K < max(W, H); i++){
			add_and({i, i + k});
			ct++;
		}
	vector<int> v;
	for(int i = H*W; i < H*W + ct; i++) v.push_back(i);
	add_or(v);
}

Compilation message

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:5:26: error: 'max' was not declared in this scope
    5 |   for(int i = 0; i + K < max(W, H); i++){
      |                          ^~~
vision.cpp:6:20: error: 'k' was not declared in this scope
    6 |    add_and({i, i + k});
      |                    ^
vision.cpp:6:4: error: 'add_and' was not declared in this scope
    6 |    add_and({i, i + k});
      |    ^~~~~~~
vision.cpp:9:2: error: 'vector' was not declared in this scope
    9 |  vector<int> v;
      |  ^~~~~~
vision.cpp:9:9: error: expected primary-expression before 'int'
    9 |  vector<int> v;
      |         ^~~
vision.cpp:10:38: error: 'v' was not declared in this scope
   10 |  for(int i = H*W; i < H*W + ct; i++) v.push_back(i);
      |                                      ^
vision.cpp:11:9: error: 'v' was not declared in this scope
   11 |  add_or(v);
      |         ^
vision.cpp:11:2: error: 'add_or' was not declared in this scope
   11 |  add_or(v);
      |  ^~~~~~