Submission #614087

#TimeUsernameProblemLanguageResultExecution timeMemory
614087nohaxjustsofloGap (APIO16_gap)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include <iostream> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; typedef tree<ll,null_type,less_equal<ll>,rb_tree_tag,tree_order_statistics_node_update> order_set; mt19937 mt_rand(chrono::high_resolution_clock::now().time_since_epoch().count()); //uniform_int_distribution<int> gen; ///(min, max) //int random() {return gen(mt_rand);} const int mxN=1500; const int mod=998244353; const int mxlogN=40; const int mxK=26; const ll inf=1e18; const int K=600; void MinMax(ll s, ll t, ll *mn, ll *mx); ll findGap(int T, int N) { if(T==1) { ll mn=0,mx=inf; MinMax(0,inf,mn,mx); ll ans=0; N-=2; while(N>0) { ll mn2,mx2; MinMax(mn,mx,&mn2,&mx2); ans=max(ans,mn2-mn); ans=max(ans,mx-mx2); mn=mn2+1, mx=mx2-1; N-=2; } return max(ans,mx-mn); } return 0; } /* int main() { }*/ /* 7 3 4 1 3 4 0 2 3 */

Compilation message (stderr)

gap.cpp: In function 'll findGap(int, int)':
gap.cpp:27:22: error: invalid conversion from 'll' {aka 'long long int'} to 'll*' {aka 'long long int*'} [-fpermissive]
   27 |         MinMax(0,inf,mn,mx);
      |                      ^~
      |                      |
      |                      ll {aka long long int}
gap.cpp:21:29: note:   initializing argument 3 of 'void MinMax(ll, ll, ll*, ll*)'
   21 | void MinMax(ll s, ll t, ll *mn, ll *mx);
      |                         ~~~~^~
gap.cpp:27:25: error: invalid conversion from 'll' {aka 'long long int'} to 'll*' {aka 'long long int*'} [-fpermissive]
   27 |         MinMax(0,inf,mn,mx);
      |                         ^~
      |                         |
      |                         ll {aka long long int}
gap.cpp:21:37: note:   initializing argument 4 of 'void MinMax(ll, ll, ll*, ll*)'
   21 | void MinMax(ll s, ll t, ll *mn, ll *mx);
      |                                 ~~~~^~