Submission #284109

#TimeUsernameProblemLanguageResultExecution timeMemory
284109Pichon5Vision Program (IOI19_vision)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "vision.h" /*NOT: has exactly one input. Its output is 1 if the input is , otherwise its output is . AND: has one or more inputs. Its output is if and only if all of the inputs are . OR: has one or more inputs. Its output is if and only if at least one of the inputs is . XOR: has one or more inputs. Its output is if and only if an odd number of the */ using namespace std; void construct_network(int H, int W, int K) { vector<int>v; for(int i=0;i<H*W-k;i++){ v.push_back(add_and(i,i+k)); } add_or(v); /*add_not(c); Ns = {0, 1}; int a = add_and(Ns); Ns = {0, a}; int b = add_or(Ns); Ns = {0, 1, b}; int c = add_xor(Ns); add_not(c);*/ }

Compilation message (stderr)

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:14:20: error: 'k' was not declared in this scope
   14 |  for(int i=0;i<H*W-k;i++){
      |                    ^