Submission #1087436

#TimeUsernameProblemLanguageResultExecution timeMemory
1087436juicyTreasure (different grader from official contest) (CEOI13_treasure2)C++17
Compilation error
0 ms0 KiB
#include "treasure.h" #include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "debug.h" #else #define debug(...) 42 #endif mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); void rec(int a, int b, int c, int d, int cnt) { if (tie(a, b) == tie(c, d)) { Report(a, b); return; } if (rng() % 2 && a != c) { int m = (a + c) / 2; int x = countTreasure(a, b, m, d); if (x) { rec(a, b, m, d, x); } if (x < cnt) { rec(m + 1, b, c, d, cnt - x); } } else { int m = (b + d) / 2; int x = countTreasure(a, b, c, m); if (x) { rec(a, b, c, m, x); } if (x < cnt) { rec(a, m + 1, c, d, cnt - x); } } } void findTreasure (int n) { rec(1, 1, n, n); }

Compilation message (stderr)

treasure.cpp: In function 'void findTreasure(int)':
treasure.cpp:42:17: error: too few arguments to function 'void rec(int, int, int, int, int)'
   42 |   rec(1, 1, n, n);
      |                 ^
treasure.cpp:15:6: note: declared here
   15 | void rec(int a, int b, int c, int d, int cnt) {
      |      ^~~