Submission #1233811

#TimeUsernameProblemLanguageResultExecution timeMemory
1233811jundiVision Program (IOI19_vision)C++20
Compilation error
0 ms0 KiB

#include <bits/stdc++.h>
#include"vision.h"
using namespace std;
void construct_network(int h,int w,int k){
    int n=h*w;
    int not0=add_not(0);
    vector<int> tmp={0,not0};
    int zero_signal=add_and(tmp);
    vector<int> vec;
    for(int i=0;i<h;i++){
        for(int j=0;j<w;j++){
            if(i==0&&j==0)continue;
            if(i+j==k){
                vec.push_back(i*w+j);
            }
        }
    }
    unordered_set<int> re(vec.begin(),vec.end());
    vector<int> black;
    for(int i=1;i<n;i++){
        if(re.find(i)==s_set.end()){
            black.push_back(i);
        }
    }
    int blackor=add_or(black);
    int a1=add_not(black);
    vector<int> output;
    for(int j:vec){
        vector<int> input;
        for(int k:vec){
            if(k==j)continue;
            input.push_back(k);
        }
        int otheror;
        if(inputs.empty()){
            otheror=zero_signal;
        }else{
            otheror=add_or(other_in_s_inputs);
        }
        int a2=add_not(otheror);
        vector<int> input={0,j,a1,a2};
        output.push_back(add_and(input));
    }
    add_or(output);
}

Compilation message (stderr)

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:22:24: error: 's_set' was not declared in this scope
   22 |         if(re.find(i)==s_set.end()){
      |                        ^~~~~
vision.cpp:27:20: error: cannot convert 'std::vector<int>' to 'int'
   27 |     int a1=add_not(black);
      |                    ^~~~~
      |                    |
      |                    std::vector<int>
In file included from vision.cpp:3:
vision.h:16:17: note:   initializing argument 1 of 'int add_not(int)'
   16 | int add_not(int N);
      |             ~~~~^
vision.cpp:36:12: error: 'inputs' was not declared in this scope; did you mean 'input'?
   36 |         if(inputs.empty()){
      |            ^~~~~~
      |            input
vision.cpp:39:28: error: 'other_in_s_inputs' was not declared in this scope
   39 |             otheror=add_or(other_in_s_inputs);
      |                            ^~~~~~~~~~~~~~~~~
vision.cpp:42:21: error: redeclaration of 'std::vector<int> input'
   42 |         vector<int> input={0,j,a1,a2};
      |                     ^~~~~
vision.cpp:30:21: note: 'std::vector<int> input' previously declared here
   30 |         vector<int> input;
      |                     ^~~~~