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 <bits/stdc++.h>
#include "gap.h"
#define f first
#define s second
#define mp make_pair
#define pb push_back
using namespace std;
typedef long long ll;
ll mas=0;
ll vv[100];
int k=0;
void ric(ll a,ll b){
ll u,v;
MinMax(a,b,&u,&v);
if(u==-1&&v==-1)return;
if(u==v){vv[k++]=u;
return;}
ll m=(u+v)>>1;
ric(u,m);
ric(m+1,v);
}
int findGap(int T,int N){
if(T==2){
ll g=1;
for(int i=0;i<18;i++)g*=10LL;
ric(0LL,g);
for(int i=0;i<N;i++)mas=max(mas,vv[i+1]-vv[i]);
return mas;
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |