제출 #369746

#제출 시각아이디문제언어결과실행 시간메모리
369746MilosMilutinovic식물 비교 (IOI20_plants)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; int n, k; vector<int> a; int compare_plants(int x, int y) { if(x==n-1) { if(y==x-1) { if(a[y]) return -1; return 1; } else { if(y!=0) return 0; if(a[x]) return 1; return -1; } } else { if(x==0) { if(y==n-1) { if(a[y]) return -1; return 1; } else { if(y!=1) return 0; if(a[x]) return 1; return -1; } } else { if(abs(x-y)!=1) return 0; if(x<y) { if(a[x]) return 1; return -1; } else { if(a[y]) return -1; return 1; } } } } void init(int K, vector<int> r) { n=(int)r.size(), k=K, a=r; } int main() { return 0; }

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

/tmp/cceUxutu.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccRTncsr.o:plants.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status