Submission #872426

#TimeUsernameProblemLanguageResultExecution timeMemory
872426browntoadMinerals (JOI19_minerals)C++14
Compilation error
0 ms0 KiB
#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 (stderr)

/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