| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1330347 | KhoaDuy | Hack (APIO25_hack) | C++20 | 8 ms | 1652 KiB |
#include "hack.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
const int blsz=7630;
const int MAXN=1e9;
int hack(){
int blcnt=(MAXN/blsz);
int a=0,b=0;
vector<ll> def;
for(int i=1;i<=blsz;i++){
def.push_back(i);
}
for(int i=__lg(blcnt);i>=0;i--){
vector<ll> v=def;
for(int bruh=0;bruh<(1<<i);bruh++){
v.push_back(v.back()+blsz);
}
if(!collisions(v)){
a+=(1<<i);
def.push_back(def.back()+1LL*(1<<i)*blsz);
}
}
while(b+1<blsz){
if(collisions({1,1+1LL*a*blsz+b})){
break;
}
b++;
}
return (a*blsz+b);
}| # | 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... | ||||
