Submission #423756

# Submission time Handle Problem Language Result Execution time Memory
423756 2021-06-11T12:23:09 Z aymanrs Vision Program (IOI19_vision) C++14
Compilation error
0 ms 0 KB
#include <bits/stdc++.h> 
using namespace std;
void construct_network(int H, int W, int K){
    vector<int> O;
    for(int i = 0;i < H;i++){
        for(int j = 0;j < W;j++){
            vector<int> o;
            for(int x = -K; x <= K;x++){
                if(j + x < 0 || j + x >= W) continue;
                if(i - K + abs(x) > 0) o.push_back((i - K + abs(x)) * W + j + x);
                if(i + K - abs(x) < H) o.push_back((i + K - abs(x)) * W + j + x);
            }
            O.push_back(add_and({add_or(o), i * W + j}));
        }
    }
    add_or(O);
}

Compilation message

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:13:34: error: 'add_or' was not declared in this scope
   13 |             O.push_back(add_and({add_or(o), i * W + j}));
      |                                  ^~~~~~
vision.cpp:13:25: error: 'add_and' was not declared in this scope
   13 |             O.push_back(add_and({add_or(o), i * W + j}));
      |                         ^~~~~~~
vision.cpp:16:5: error: 'add_or' was not declared in this scope
   16 |     add_or(O);
      |     ^~~~~~