IOI 2019 – Vision Program Problem and Solution

IOI 2019 – Vision Program Problem and Solution

The 31st International Olympiad in Informatics was held in Baku, Azerbaijan in 2019. There were two competition days, with 3 tasks given to the competitors on each day. You can see Vision Program Problem and Solution below.

Problem :


Solution :

#include "vision.h"
using namespace std;

int solve(int H, int W, int K){
	vector<int> X[444], Y[444];
	for(int i=0; i<H; i++){
		for(int j=0; j<W; j++){
	vector<int> XC, YC, XP, YP;
	vector<int> dap;
	for(int i=0; i<=H+W-2; i++){
		if(i >= K){
			dap.push_back(add_and({XC[i], XP[i-K]}));
			dap.push_back(add_and({YC[i], YP[i-K]}));
	return add_or(dap);

void construct_network(int H, int W, int K) {
	if(H+W-2 == K) solve(H, W, K);
	else add_xor({solve(H, W, K), solve(H, W, K + 1)});

Explanation :


 177 total views,  1 views today

Post Disclaimer

the above hole problem statement is given by but the solution is generated by the SLTECHACADEMY authority if any of the query regarding this post or website fill the following contact form thank you.

Leave a Reply

Your email address will not be published. Required fields are marked *