Submission #829089

#TimeUsernameProblemLanguageResultExecution timeMemory
829089definitelynotmeePacking Biscuits (IOI20_biscuits)C++17
Compilation error
0 ms0 KiB
#include "biscuits.h" #include"grader.cpp" #include<bits/stdc++.h> #define ff first #define ss second #define all(x) x.begin(), x.end() using namespace std; using ll = long long; using pii = pair<int,int>; vector<ll> ct, v; ll solve(int id, ll carry, ll x){ if(id == -1) return 1; ll minus = min(v[id], carry); carry-=minus; ll ret = solve(id-1,carry*2,x); // cerr << id << ' ' << carry << ' ' << x << endl; // cerr << "->" << carry+x << ' ' << ct[id] << ' ' << minus << endl; if(carry+x <= ct[id]-minus) ret += solve(id-1, (max(0ll, x+carry-v[id]))*2, x); return ret; } long long count_tastiness(long long x, std::vector<long long> a) { a.resize(60,0); ct = v = a; int k = a.size(); for(int i = 1; i < k; i++){ ct[i]+=ct[i-1]/2; } return solve(k-1,0,x); }

Compilation message (stderr)

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