Submission #834388

# Submission time Handle Problem Language Result Execution time Memory
834388 2023-08-22T13:54:44 Z Marco_Escandon Vision Program (IOI19_vision) C++17
Compilation error
0 ms 0 KB
#include<bits/stdc++.h>
using namespace std;
typedef int ll;
void construct_network(int H, int W, int K) {
    vector<int> inst;
	for(int i=0; i<H; i++)
	{
	    for(int j=0; j<W; j++)
        {
            vector<ll> query;
            for(int l=-K-1; l<=K; l++)
            {
                if(i+l<H&& i+l>=0 && j+K-abs(l)<W)
                {
                    query.push_back((i+l)*W+ j+K-abs(l));
                    //cout<<(i+l)*W+ j+K-abs(l)<<" ";
                }
            }
            if(query.size()!=0)
            {
                ll a= query[0];
                if(query.size()!=1)
                    a=add_or(query);
                inst.push_back(add_and({(i*W+j),a}));
            }
            //cout<<"\n";
        }
	}
	ll a=add_or(inst);
}

Compilation message

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:23:23: error: 'add_or' was not declared in this scope
   23 |                     a=add_or(query);
      |                       ^~~~~~
vision.cpp:24:32: error: 'add_and' was not declared in this scope
   24 |                 inst.push_back(add_and({(i*W+j),a}));
      |                                ^~~~~~~
vision.cpp:29:7: error: 'add_or' was not declared in this scope
   29 |  ll a=add_or(inst);
      |       ^~~~~~
vision.cpp:29:5: warning: unused variable 'a' [-Wunused-variable]
   29 |  ll a=add_or(inst);
      |     ^