Submission #1205144

#TimeUsernameProblemLanguageResultExecution timeMemory
1205144hackstarHack (APIO25_hack)C++20
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #pragma GCC optimize("Ofast,O3,unroll-loops") #pragma GCC target("avx,avx2") #define ll long long #define int long long #define pii pair<int,int> #define vec vector #define vi vector<int> using namespace std; const int INF = LLONG_MAX; int hack(){ int N = 1e9; const int S = 31623; vi q(1); int block_end = -1; for(int x = S; x <= N; x += S){ q[0] = x; if(collisions(q)){ block_end = x; break; } } if(block_end == -1) block_end = N; int low = max(1LL, block_end - S + 1), high = block_end; while(low < high){ int mid = low + (high - low) / 2; q[0] = mid; if(collisions(q)) high = mid; else low = mid + 1; } return low; } void solve(){ cout << hack(); } signed main(){ ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); int t=1; //cin>>t; // single‐test problem while(t--){ solve(); } return 0; }

Compilation message (stderr)

hack.cpp: In function 'long long int hack()':
hack.cpp:19:20: error: 'collisions' was not declared in this scope
   19 |                 if(collisions(q)){
      |                    ^~~~~~~~~~
hack.cpp:29:20: error: 'collisions' was not declared in this scope
   29 |                 if(collisions(q))
      |                    ^~~~~~~~~~