Submission #464717

#TimeUsernameProblemLanguageResultExecution timeMemory
464717nickmet2004Gap (APIO16_gap)C++11
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #include "gap.h" #define ll long long using namespace std; ll findGap(int T , int n){ ll ans = 0; if(T == 1){ ll x = 0 , y = 1e18; for(int i = 1; i <= (n + 1) /2; ++i){ ll mn , mx; MinMax(x , y , &mn , &mx); if(x) ans = max(ans , mn - x + 1); if(y != 1e18) ans = max(ans , y - mx + 1); if(i == ((n + 1) /2)) ans = max(ans , mx - mn+1); x = mn + 1; y = mx - 1; } } return ans; 1 2 3 4 5 6 }

Compilation message (stderr)

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:21:7: error: expected ';' before numeric constant
   21 |      1 2 3 4 5 6
      |       ^~
      |       ;
gap.cpp:21:6: warning: statement has no effect [-Wunused-value]
   21 |      1 2 3 4 5 6
      |      ^