Submission #245398

#TimeUsernameProblemLanguageResultExecution timeMemory
245398neihcr7jGap (APIO16_gap)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #include "gap.h" #define maxn 100005 using namespace std; typedef long long ll; ll findGap(int T, int n) { ll l = 0, r = 1000000000000000000; int i = 1, j = n; vector < ll > a(n + 1); while (i <= j) { ll x, y; MinMax(l, r, &x, &y); a[i] = x; a[j] = y; i ++; j -- l = x + 1; r = y - 1; } ll ma = 0; for (int i = 2; i <= n; ++i) ma = max(ma, a[i] - a[i - 1]); return ma; }

Compilation message (stderr)

gap.cpp: In function 'll findGap(int, int)':
gap.cpp:23:5: error: expected ';' before 'l'
     l = x + 1;
     ^