답안 #872426

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
872426 2023-11-13T05:22:13 Z browntoad Minerals (JOI19_minerals) C++14
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
using namespace std;
long double p = 0.10;
int f(int a){
    if (a <= 1) return 0;
    if (a == 2) return 2;
    int tmp = max((int)(p*a), 1);
    return f(tmp)+f(a-tmp)+a+tmp-1;
}
signed main(){
    int n = 43000;
    p = 0.39;
    cout<<f(3)<<endl;
    p = 0.10;
    while(p < 0.70){
        cout<<p<<' '<<f(n)+2*n<<endl;
        p += 0.01;
    }

}

Compilation message

/usr/bin/ld: /tmp/ccyU9FRR.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccSSf4BS.o:minerals.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccyU9FRR.o: in function `main':
grader.cpp:(.text.startup+0xbd): undefined reference to `Solve(int)'
collect2: error: ld returned 1 exit status