Submission #1207577

#TimeUsernameProblemLanguageResultExecution timeMemory
1207577cheat_when_I_was_youngHack (APIO25_hack)C++17
Compilation error
0 ms0 KiB
#include "bits/stdc++.h" using namespace std; int hack() { vector<long long> a; for (int i = 1; i <= 1000000; ++i) a.emplace_back(i); long long res = collisions(a); for (int n = 1; n <= 1000000; ++n) { int q = 1000000 / n; int r = 1000000 % n; long long val = (long long)q * (q - 1) / 2 * n + (long long)q * r; if (val == res) return n; } return -1; }

Compilation message (stderr)

hack.cpp: In function 'int hack()':
hack.cpp:7:21: error: 'collisions' was not declared in this scope
    7 |     long long res = collisions(a);
      |                     ^~~~~~~~~~