Submission #1285718

#TimeUsernameProblemLanguageResultExecution timeMemory
1285718SmuggingSpunHack (APIO25_hack)C++20
0 / 100
8 ms1200 KiB
#include "hack.h" #include<bits/stdc++.h> using namespace std; typedef long long ll; int hack(){ int low = 1, high = 1e9, ans; while(low <= high){ int mid = (low + high) >> 1, sqr = sqrt(mid); vector<ll>p; for(int i = 1; i < sqr; i++){ p.push_back(i); p.push_back(sqr * i); } p.push_back(sqr * sqr); if(collisions(p) > 0){ high = (ans = mid) - 1; } else{ low = mid + 1; } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...