Submission #1299979

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

Compilation message (stderr)

hack.cpp: In function 'int hack()':
hack.cpp:11:17: error: 'vi' was not declared in this scope
   11 |                 vi v;
      |                 ^~
hack.cpp:12:43: error: 'v' was not declared in this scope
   12 |                 for(int i=l; i<=mid; ++i) v.push_back(i);
      |                                           ^
hack.cpp:13:36: error: 'v' was not declared in this scope
   13 |                 int x = collisions(v);
      |                                    ^