| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1352785 | KALARRY | Gap (APIO16_gap) | C++20 | 25 ms | 1216 KiB |
//chockolateman
#include<bits/stdc++.h>
#include "gap.h"
using namespace std;
long long findGap(int T, int N)
{
long long reta;
long long retb;
MinMax(0,1e18,&reta,&retb);
long long mn = reta;
long long mx = retb;
long long K = ceil((mx - mn)/(N-1.00));
long long start = mn;
long long pos = start + 1;
while(start < mx)
{
MinMax(pos,pos+K,&reta,&retb);
pos = pos + K + 1;
if(reta != -1)
{
K = max(K,reta - start + 1);
start = retb+1;
pos = start + 1;
}
}
return K;
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
