Submission #1149697

#TimeUsernameProblemLanguageResultExecution timeMemory
1149697vladiliusGap (APIO16_gap)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #define "gap.h" using namespace std; using ll = long long; using pii = pair<int, int>; #define pb push_back #define ff first #define ss second const ll inf = 1e18; ll findGap(int T, int n){ ll l, r, s = 0, t = inf; vector<ll> a(n); for (int i = 0; i < (n + 1) / 2; i++){ MinMax(s, t, &l, &r); a[i] = l; a[n - i - 1] = r; s = l + 1; t = r - 1; } ll out = 0; for (int i = 0; i < (n - 1); i++){ out = max(out, a[i + 1] - a[i]); } return out; }

Compilation message (stderr)

gap.cpp:2:9: error: macro names must be identifiers
    2 | #define "gap.h"
      |         ^~~~~~~
gap.cpp: In function 'll findGap(int, int)':
gap.cpp:15:9: error: 'MinMax' was not declared in this scope
   15 |         MinMax(s, t, &l, &r);
      |         ^~~~~~