Submission #1050187

#TimeUsernameProblemLanguageResultExecution timeMemory
1050187nisanduuVision Program (IOI19_vision)C++14
Compilation error
0 ms0 KiB
#include "vision.h" #include <bits/stdc++.h> using namespace std; bool c(int i,int j,int n,int m){ if(i<0||j<0||i>=n||j>=m) return false; return true; } void construct_network(int H, int W, int K) { vector<int> indexes; set<vector<int>> s; int n = H, m = W, k = K; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ int cr = i*W + j; vector<int> vec; for(int r=0;r<=k;r++){ int rem = k-r; if(c(i+r,j+rem,n,m)){ int nin = (i+r)*W + (j+rem); //int in = add_and({nin,cr}); vec.push_back(nin); } if(c(i-r,j+rem,n,m)){ int nin = (i-r)*W + (j+rem); //int in = add_and({nin,cr}); vec.push_back(nin); } if(c(i+r,j-rem,n,m)){ int nin = (i+r)*W + (j-rem); //int in = add_and({nin,cr}); vec.push_back(nin); } if(c(i-r,j-rem,n,m)){ int nin = (i-r)*W + (j-rem); //int in = add_and({nin,cr}); vec.push_back(nin); } } // if(vec.size()%2==0){ // vec.push_back(cr); // int ind1 = add_xor(vec); // vec.push_back(cr); // int ind2 = add_xor(vec); // }else{ // vec.push_back(cr); // vec.push_back(cr); // s.insert(vec); // } int ind1 = add_or(vec); int ind2 = add_and({ind1,cr}); indexs.push_back(ind2); } } // for(auto z:s){ // int i = add_xor(z); // indexes.push_back(i); // } int f = add_or(indexes); }

Compilation message (stderr)

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:55:10: error: 'indexs' was not declared in this scope; did you mean 'indexes'?
   55 |          indexs.push_back(ind2);
      |          ^~~~~~
      |          indexes
vision.cpp:62:6: warning: unused variable 'f' [-Wunused-variable]
   62 |  int f = add_or(indexes);
      |      ^