답안 #316660

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
316660 2020-10-27T05:36:34 Z kylych03 Vision Program (IOI19_vision) C++14
컴파일 오류
0 ms 0 KB
#include "vision.h"
#include <bits/stdc++.h>
#include "grader.cpp"
using namespace std;
vector<int> dl[404], dr[404];
int diogl[404], diogr[404], prl[404], prr[404];
void construct_network(int H, int W, int K) {
    vector <int> vec1, vec2;
    for(int  i = 0; i < H; i++)
    for(int j  = 0 ; j < W ; j++){
        dl[i+j].push_back( i*W + j);
        dr[i - j + W -1].push_back(i*W + j);
    }
    for(int i = 0 ; i < H + W -1; i++){
        diogl[i] = add_or(dl[i]);
        diogr[i] = add_or(dr[i]);
        if(i==0){
            prl[i] = add_or({diogl[i]});
            prr[i] = add_or({diogr[i]});
        }
        else{
            prl[i] = add_or({prl[i-1], diogl[i]});
            prr[i] = add_or({prr[i-1], diogr[i]});

        }
        if(i>=K){
            vec1.push_back( add_and({ diogl[i], prl[i - K]}));
            vec1.push_back( add_and({ diogr[i], prr[i - K]}));
        }
        if(i>=K+1){
            vec2.push_back( add_and({ diogl[i], prl[i - K - 1]}));
            vec2.push_back( add_and({ diogr[i], prr[i - K - 1]}));
        }

    }
    if(vec2.size()!=0 )
    add_xor( {add_or(vec1), add_or(vec2)});
    else
    add_or(vec1);

}

Compilation message

/tmp/ccnsRXpF.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/cclpipGO.o:vision.cpp:(.text.startup+0x0): first defined here
/tmp/ccnsRXpF.o: In function `add_not(int)':
grader.cpp:(.text+0x260): multiple definition of `add_not(int)'
/tmp/cclpipGO.o:vision.cpp:(.text+0x7d0): first defined here
/tmp/ccnsRXpF.o: In function `add_xor(std::vector<int, std::allocator<int> >)':
grader.cpp:(.text+0x430): multiple definition of `add_xor(std::vector<int, std::allocator<int> >)'
/tmp/cclpipGO.o:vision.cpp:(.text+0x470): first defined here
/tmp/ccnsRXpF.o: In function `add_and(std::vector<int, std::allocator<int> >)':
grader.cpp:(.text+0x5e0): multiple definition of `add_and(std::vector<int, std::allocator<int> >)'
/tmp/cclpipGO.o:vision.cpp:(.text+0x620): first defined here
/tmp/ccnsRXpF.o: In function `add_or(std::vector<int, std::allocator<int> >)':
grader.cpp:(.text+0x790): multiple definition of `add_or(std::vector<int, std::allocator<int> >)'
/tmp/cclpipGO.o:vision.cpp:(.text+0x2c0): first defined here
collect2: error: ld returned 1 exit status