| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1330377 | KhoaDuy | Hack (APIO25_hack) | C++20 | 4 ms | 1216 KiB |
#include "hack.h"
//#include "grader.cpp"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
const int MAXN=1e9;
int hack(){
int low=1,high=MAXN;
while(low<high){
int mid=((high+low)>>1);
int sz=mid-low+1;
vector<ll> v;
int blsz=sqrt(sz);
int blcnt=(sz/blsz);
for(int i=1;i<=blsz;i++){
v.push_back(i);
}
if(low>1){
v.push_back(v.back()+low-1);
}
for(int i=1;i<=blcnt;i++){
v.push_back(v.back()+blsz);
}
if(collisions(v)){
high=mid;
}
else{
low=mid+1;
}
}
return low;
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
