답안 #815356

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
815356 2023-08-08T14:22:47 Z PagodePaiva Vision Program (IOI19_vision) C++14
컴파일 오류
0 ms 0 KB
    #include "vision.h"
    #include<bits/stdc++.h>
    #define fr first
    #define sc second
     
    using namespace std;
     
    int dist(pair <int,int>a,pair<int,int>b){
    	return abs(a.fr-b.fr)+abs(a.sc-b.sc);
    }
     
    void construct_network(int H, int W, int K) {
    	// std::vector<int> Ns;
    	// 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);
     
    	int n = H, m = W, k = K;
    	int r = n*m;
     	vector <int> auxx;
     	vector <int> aux;

    	for(int i = 0;i < n;i++){
    		for(int j = 0;j < m;j++){
    			for(int i1 = 0;i1 < n;i1++){
    				for(int j1 = 0;j1 < m;j1++){
    					if(dist({i, j}, {i1, j1}) == k){
    						// r = add_and({i*m+j, i1*m+j1});
    						auxx.push_back(i1*m+j1);	
    					}
    				}
    			}

    			int a1 = add_xor(auxx);
    			auxx.push_back({i*m+j});
    			int a2 = add_xor(auxx);
    			a2 = add_neq(auxx);
    			r = add_and({a1, a2});
    			aux.push_back(r);
    		}
    	}
     
    	add_or(aux);
     
    	return;
    }

Compilation message

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:41:13: error: 'add_neq' was not declared in this scope; did you mean 'add_not'?
   41 |        a2 = add_neq(auxx);
      |             ^~~~~~~
      |             add_not