Submission #1300066

#TimeUsernameProblemLanguageResultExecution timeMemory
1300066faricaHack (APIO25_hack)C++20
Compilation error
0 ms0 KiB
#include "hack.h" #include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<ll>; int hack(){ int l = 1, r = 1e6; while(l < r) { cout << l << " " << r << endl; int mid = (l+r)/2; if(r-l == 1) ++mid; vi v; v.push_back(1); ll cnt = 1; for(int i=l; i<mid; ++i) { if(cnt >= RNG) { v.push_back(cnt+1); cnt = i; } else cnt *= i; } v.push_back(cnt+1); int x = collisions(v); if(x) { r = mid - 1; } else l = mid; } return r; }

Compilation message (stderr)

hack.cpp: In function 'int hack()':
hack.cpp:18:35: error: 'RNG' was not declared in this scope
   18 |                         if(cnt >= RNG) {
      |                                   ^~~