제출 #123026

#제출 시각아이디문제언어결과실행 시간메모리
123026teki자동 인형 (IOI18_doll)C++11
컴파일 에러
0 ms0 KiB
#include "doll.h" #include <bits/stdc++.h> typedef long long ll; #define pb push_back #define MS(x,y) memset((x),(y),sizeof((x))) #define mn 1000000 using namespace std; int n,sw,p=1; vector<int> x(1<<20),y(1<<20); bitset <(1<<20)> b; int build(int left, int right) { if (left >= right) return 0; else if (right < p-n) return -1; int ts = sw; sw++; int mid = (left+right)/2; x[ts-1] = build(left, mid); y[ts-1] = build(mid+1, right); return ts; } void pt (int i, int j) { int a; if (b[-i]) a = y[-i-1]; else a = x[-i-1]; b[-i] = !b[-i]; if (a <= 0) a = j; else pt(a,j); } void create_circuit(int m, vector<int> a) { n = (int)a.size(); while (p < n) p*=2; build(0, p-1); for (int i = 1; i<n; i++) pt(-1,a[i]); if (n == 1) pt(-1,-1); pt(-1,0); vector<int> c(m+1, 1); x.resize(sw); y.resize(sw); c[0] = a[0]; answer(c,x,y); } int main() { #if LOCAL_DEBUG fstream cin("in.txt"); #endif ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); return 0; }

컴파일 시 표준 에러 (stderr) 메시지

/usr/bin/ld: /tmp/ccOcVlDS.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cczlDRvR.o:doll.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status