Submission #856395

# Submission time Handle Problem Language Result Execution time Memory
856395 2023-10-03T11:32:01 Z Trisanu_Das Vision Program (IOI19_vision) C++17
Compilation error
0 ms 0 KB
#include "vision.h"
#include <bits/stdc++.h>
using namespace std; 
void construct_network(int h, int w, int k){
  vector<int> ans;
  for(int i = 0; i < h; i++){
    for(int j = 0; j < w; j++){
      vector<int> res;
      for(int x = 0; x < h; x++) for(int y = 0; y < w; y++) if(abs(i - x) + abs(j - y) == k) res.push_back(x * w + y);
      if(!res.empty()) ans.push_back(add_and({add_or(res, i * w + j)}));
    }
  }
  add_or(ans);
}

Compilation message

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:10:68: error: too many arguments to function 'int add_or(std::vector<int>)'
   10 |       if(!res.empty()) ans.push_back(add_and({add_or(res, i * w + j)}));
      |                                                                    ^
In file included from vision.cpp:1:
vision.h:12:5: note: declared here
   12 | int add_or(std::vector<int> Ns);
      |     ^~~~~~