답안 #1050510

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1050510 2024-08-09T10:20:25 Z vjudge1 Vision Program (IOI19_vision) C++17
컴파일 오류
0 ms 0 KB
#pragma GCC optimize("unroll-loops,Ofast,O3")
#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define spc << " " <<
#define endl "\n"
#define all(x) x.begin(), x.end()
#define int long long
#define ii pair<long long,int>
#define vi vector<int>
#define vii vector<ii>
#define st first
#define nd second
#define inf 1e15
#define MOD 1000000007
#define MX 50005
using namespace std;


int add_not(int N);
int add_and(vi Ns);
int add_or(vi Ns);
int add_xor(vi Ns);

void construct_network(int H, int W, int K){
    vi results;
    for(int i=0; i<H; i++){
        for(int j=0; j<W; j++){
            if(i+j+K > H+W-2) continue;
            vi ors;
            for(int k=0; k<=K; k++){
                if(i+k<H && j+K-k<W) ors.pb((i+k)*W+(j+K-k));
            }
            int res = add_or(ors);
            results.pb(add_and({add_and({i*W+j}), res}));
        }
    }
    add_or(results);
}

Compilation message

/usr/bin/ld: /tmp/cciO7zch.o: in function `construct_network(long long, long long, long long)':
vision.cpp:(.text+0x459): undefined reference to `add_or(std::vector<long long, std::allocator<long long> >)'
/usr/bin/ld: vision.cpp:(.text+0x4d2): undefined reference to `add_and(std::vector<long long, std::allocator<long long> >)'
/usr/bin/ld: vision.cpp:(.text+0x530): undefined reference to `add_and(std::vector<long long, std::allocator<long long> >)'
/usr/bin/ld: vision.cpp:(.text+0x674): undefined reference to `add_or(std::vector<long long, std::allocator<long long> >)'
/usr/bin/ld: /tmp/ccP2Jrij.o: in function `main':
grader.cpp:(.text.startup+0x1b3): undefined reference to `construct_network(int, int, int)'
collect2: error: ld returned 1 exit status