# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
560874 | Huy | Gap (APIO16_gap) | C++17 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include"gap.h"
#include<bits/stdc++.h>
//#define int long long
#define pii pair<int,int>
#define fi first
#define se second
/*#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")*/
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ldb = long double;
const int N = (int)1e8;
const int maxN = (int)1e5 + 1;
const ll mod = 1e9 + 7;
//const int mod = 998244353;
const ll infty = 1e18;
const ll logn = 18;
const int base = 311;
const int Block_size = 500;
const int ep = 'a';
int cu[] = {0,0,1,-1};
int cv[] = {-1,1,0,0};
int du[] = {-1,-1,+1,1};
int dv[] = {-1,+1,-1,1};
int cled[] = {6,2,5,5,4,5,6,3,7,6};
void InputFile()
{
freopen(".inp","r",stdin);
freopen(".out","w",stdout);
//freopen("test.out","r",stdin);
}
void FastInput()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
}
ll a[maxN];
void FindGap(int T,int N)
{
ll res = 0;
MinMax(0,infty,&a[1],&a[n]);
ll h = (a[n] - a[1] + n - 2) / (n - 1);
int prev = a[1];
ll now = a[1] + 1;
while(true)
{
int x,y;
Minmax(now,now + h - 1,&x,&y);
res = max(res,x - prev);
pre = max(pre,y);
now += h;
if(y == a[n]) break;
}
return res;
}
/*void Read()
{
}
void Solve()
{
}
void Debug()
{
//Main_sub();
//Naive();
}
int32_t main()
{
FastInput();
//InputFile();
//int sub_type;
//cin >> sub_type;
//Sieve();
int test;
//cin >> test;
test = 1;
while(test--)
//for(int prc = 1; prc <= test; prc++)
{
Read();
Solve();
//Debug();
}
}*/