제출 #1214034

#제출 시각아이디문제언어결과실행 시간메모리
1214034fskaricaHack (APIO25_hack)C++20
0 / 100
24 ms16020 KiB
#include "hack.h" #include <bits/stdc++.h> using namespace std; #define ll long long #define fi first #define se second #define pii pair<ll, ll> ll n = 1000000; ll bs(ll col) { ll lo = 1; ll hi = n; while (lo < hi) { ll mid = (lo + hi) / 2; ll cnt = 0; cnt += (n / mid) * (n / mid - 1) / 2 * n; cnt += (n % mid) * (n / mid); if (cnt > col) lo = mid + 1; else hi = mid; } return lo; } int hack() { vector <ll> v; for (ll i = 0; i < n; i++) v.push_back(i); ll x = collisions(v); return bs(x); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...