Submission #1162279

#TimeUsernameProblemLanguageResultExecution timeMemory
1162279MinhKienGap (APIO16_gap)C++20
Compilation error
0 ms0 KiB
long long a[N]; long long findGap(int T, int n) { long long ans = 0; for (int i = 1; i <= n; ++i) { cin >> a[i]; if (i > 1) ans = max(ans, a[i] - a[i - 1]); } return ans; }

Compilation message (stderr)

gap.cpp:1:13: error: 'N' was not declared in this scope
    1 | long long a[N];
      |             ^
gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:5:5: error: 'cin' was not declared in this scope
    5 |     cin >> a[i];
      |     ^~~
gap.cpp:5:12: error: 'a' was not declared in this scope
    5 |     cin >> a[i];
      |            ^
gap.cpp:6:22: error: 'max' was not declared in this scope
    6 |     if (i > 1) ans = max(ans, a[i] - a[i - 1]);
      |                      ^~~