Submission #617885

# Submission time Handle Problem Language Result Execution time Memory
617885 2022-08-01T16:20:42 Z Minindu2006 Vision Program (IOI19_vision) C++14
Compilation error
0 ms 0 KB
#include "vision.h"
#include <bits/stdc++.h>
using namespace std;
void construct_network(int H, int W, int K)
{
	
	vector<int> allops;
	for (int i = 0; i < H; i++)
	{
		for (int j = 0; j < W; j++)
		{
			vector<int> kDis;
			for (int x = 0; x < H; x++)
			{
				for (int y = 0; y < W; y++)
				{
					if (abs(x - i) + abs(y - i) == K)
						kDis.push_back(x * W + y);
				}
			}
          	if(!allpos.empty())
				allops.push_back(add_and({i * W + j, add_or(kDis)}));
		}
	}
	add_or(allops);
}

Compilation message

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:21:16: error: 'allpos' was not declared in this scope; did you mean 'allops'?
   21 |            if(!allpos.empty())
      |                ^~~~~~
      |                allops