Submission #291695

# Submission time Handle Problem Language Result Execution time Memory
291695 2020-09-05T16:39:09 Z medmdg Vision Program (IOI19_vision) C++14
Compilation error
0 ms 0 KB
#include<bits/stdc++.h>
#include "vision.h"
using namespace std;
 
void construct_network(int H, int W, int K){
    vector<int> b;
    b.push_back(0);
    b.push_back(1);
    if(H*W>2)
        b.push_back(2);
    int l=add_and(b);
    b.pop_back();
    b.pop_back();
    if(b.size())
        b.pop_back();
    b.push_back(l);
    if(H*W==2){
        if(K==1)
            return;
        else
            l=add_not(0);
        return;
    }
    if(min(H,W)==1){
        for(int i=0;i<H*W-K;i++){
            vector<int> ans;
            ans.push_back(i);
            ans.push_back(i+K);
            l=add_and(ans);
            ans.pop_back();
            ans.pop_back();
            ans.push_back(l-1);
            ans.push_back(l);
            l=and_or(ans);
        }
        return;
    }
}

Compilation message

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:34:15: error: 'and_or' was not declared in this scope; did you mean 'add_or'?
   34 |             l=and_or(ans);
      |               ^~~~~~
      |               add_or