Submission #228521

# Submission time Handle Problem Language Result Execution time Memory
228521 2020-05-01T10:42:22 Z maximath_1 Vision Program (IOI19_vision) C++17
Compilation error
0 ms 0 KB
#include"vision.h"
#include<bits/stdc++.h>
using namespace std;
int solve(int h, int w, int k){
	vector<int>diagL[400], diagR[400], prefL, prefR, res;
	for(int i=0; i<h; i++)
		for(int j=0; j<w; j++){
			diagL[i+j].push_back(i*w+j);
			diagR[i+(w-1-j)].push_back(i*w+j);
		}
	for(int d=k; d<h+w-1; d++){
		prefL.push_back(add_or(diagL[d-k]));
		prefR.push_back(add_or(diagR[d-k]));
		ans.push_back(add_ans({add_or(diagL[d]), add_or(prefL)}));
		ans.push_back(add_ans({add_or(diagR[d]), add_or(prefR)}));
	}
	return add_or(ans);
}
void construct_network(int h, int w, int k){
	if(k==h+w-2) solve(h, w, k);
	else add_and({solve(h, w, k), add_not(solve(h, w, k+1))});
}

Compilation message

vision.cpp: In function 'int solve(int, int, int)':
vision.cpp:14:3: error: 'ans' was not declared in this scope
   ans.push_back(add_ans({add_or(diagL[d]), add_or(prefL)}));
   ^~~
vision.cpp:14:3: note: suggested alternative: 'abs'
   ans.push_back(add_ans({add_or(diagL[d]), add_or(prefL)}));
   ^~~
   abs
vision.cpp:14:17: error: 'add_ans' was not declared in this scope
   ans.push_back(add_ans({add_or(diagL[d]), add_or(prefL)}));
                 ^~~~~~~
vision.cpp:14:17: note: suggested alternative: 'add_and'
   ans.push_back(add_ans({add_or(diagL[d]), add_or(prefL)}));
                 ^~~~~~~
                 add_and
vision.cpp:17:16: error: 'ans' was not declared in this scope
  return add_or(ans);
                ^~~
vision.cpp:17:16: note: suggested alternative: 'abs'
  return add_or(ans);
                ^~~
                abs