Submission #769729

#TimeUsernameProblemLanguageResultExecution timeMemory
769729boris_mihov비스킷 담기 (IOI20_biscuits)C++17
Compilation error
0 ms0 KiB
#include "biscuits.h" #include <algorithm> #include <iostream> #include <numeric> #include <cassert> #include <vector> typedef long long llong; const int MAXN = 64; const int INF = 1e9; int n; llong x; llong a[MAXN]; llong rec(int pos, llong prenos) { if (pos == n) { return 1; } llong ans = 0; llong curr = a[pos] + prenos; if (curr >= x) ans += rec(pos + 1, (curr - x) / 2); ans += rec(pos + 1, curr / 2); return ans; } llong count_tastiness(llong X, std::vector <llong> A) { n = A.size(); x = X; llong sum = 0; for (int i = 0 ; i < n ; ++i) { a[i] = A[i]; sum += a[i] * (1LL << i); } assert(sum <= 10000); return brute(0, 0); }

Compilation message (stderr)

biscuits.cpp: In function 'llong count_tastiness(llong, std::vector<long long int>)':
biscuits.cpp:43:9: error: 'brute' was not declared in this scope
   43 |  return brute(0, 0);
      |         ^~~~~