답안 #523104

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
523104 2022-02-07T05:34:58 Z Baytoro CONSUL (info1cup19_consul) C++17
컴파일 오류
0 ms 0 KB
#include "grader.h"
#include "grader.cpp"
void solve(int n)
{
    for(int i=0;i<n;i++){
    	int x=kth(i+1);
    	int y=cnt(x);
    	if(y>n/3){
    		say_answer(x);
    		return;
    	}
	}
	say_answer(-1);
}

Compilation message

/usr/bin/ld: /tmp/ccWVT8Se.o: in function `kth(int)':
grader.cpp:(.text+0x0): multiple definition of `kth(int)'; /tmp/cczl2umf.o:consul.cpp:(.text+0x0): first defined here
/usr/bin/ld: /tmp/ccWVT8Se.o: in function `cnt(int)':
grader.cpp:(.text+0xb0): multiple definition of `cnt(int)'; /tmp/cczl2umf.o:consul.cpp:(.text+0xb0): first defined here
/usr/bin/ld: /tmp/ccWVT8Se.o: in function `say_answer(int)':
grader.cpp:(.text+0x160): multiple definition of `say_answer(int)'; /tmp/cczl2umf.o:consul.cpp:(.text+0x160): first defined here
/usr/bin/ld: /tmp/ccWVT8Se.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cczl2umf.o:consul.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status