Submission #156665

#TimeUsernameProblemLanguageResultExecution timeMemory
156665a_playerGap (APIO16_gap)C++14
Compilation error
0 ms0 KiB
#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[100001]; 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;} if(v-u==1){ ll h,p; MinMax(u,u,&h,&p); if(h==p)vv[k++]=p; MinMax(v,v&h,&p); if(h==p)vv[k++]=p; return; } ll m=(v-u)/3; ric(u,u+m); ric(u+m+1,u+2*m); ric(u+2*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; } ll a=0,b=1000000000000000000; int i=0,j=N-1; while(i<=j){ MinMax(a,b,&a,&b); vv[i]=a; vv[j]=b; i++; j--; a++; b--; } for(int i=0;i<N-1;i++)mas=max(mas,vv[i+1]-vv[i]); return mas; }

Compilation message (stderr)

gap.cpp: In function 'void ric(ll, ll)':
gap.cpp:24:22: error: too few arguments to function 'void MinMax(long long int, long long int, long long int*, long long int*)'
       MinMax(v,v&h,&p);
                      ^
In file included from gap.cpp:2:0:
gap.h:1:6: note: declared here
 void MinMax(long long, long long, long long*, long long*);
      ^~~~~~