jumps.cpp:1:2: error: stray '#' in program
1 | a#include <bits/stdc++.h>
| ^
jumps.cpp:1:1: error: 'a' does not name a type
1 | a#include <bits/stdc++.h>
| ^
jumps.cpp: In function 'int main()':
jumps.cpp:5:5: error: 'ios' has not been declared
5 | ios::sync_with_stdio(false);
| ^~~
jumps.cpp:6:5: error: 'cin' was not declared in this scope
6 | cin.tie(nullptr);
| ^~~
jumps.cpp:9:5: error: 'vector' was not declared in this scope
9 | vector<int> a(n);
| ^~~~~~
jumps.cpp:9:12: error: expected primary-expression before 'int'
9 | vector<int> a(n);
| ^~~
jumps.cpp:11:16: error: 'a' was not declared in this scope
11 | cin >> a[i];
| ^
jumps.cpp:13:12: error: expected primary-expression before 'int'
13 | vector<int> stk;
| ^~~
jumps.cpp:14:12: error: 'array' was not declared in this scope
14 | vector<array<int, 2>> pos;
| ^~~~~
jumps.cpp:14:18: error: expected primary-expression before 'int'
14 | vector<array<int, 2>> pos;
| ^~~
jumps.cpp:16:17: error: 'stk' was not declared in this scope; did you mean 'std'?
16 | while (!stk.empty() && a[stk.back()] < a[i]) {
| ^~~
| std
jumps.cpp:16:32: error: 'a' was not declared in this scope
16 | while (!stk.empty() && a[stk.back()] < a[i]) {
| ^
jumps.cpp:19:14: error: 'stk' was not declared in this scope; did you mean 'std'?
19 | if (!stk.empty()) {
| ^~~
| std
jumps.cpp:20:13: error: 'pos' was not declared in this scope
20 | pos.push_back({stk.back(), i});
| ^~~
jumps.cpp:22:9: error: 'stk' was not declared in this scope; did you mean 'std'?
22 | stk.push_back(i);
| ^~~
| std
jumps.cpp:24:12: error: expected primary-expression before 'int'
24 | vector<int> s(n + 1);
| ^~~
jumps.cpp:26:9: error: 's' was not declared in this scope
26 | s[i] = max(s[i + 1], a[i]);
| ^
jumps.cpp:26:30: error: 'a' was not declared in this scope
26 | s[i] = max(s[i + 1], a[i]);
| ^
jumps.cpp:26:16: error: 'max' was not declared in this scope
26 | s[i] = max(s[i + 1], a[i]);
| ^~~
jumps.cpp:35:28: error: 'pos' was not declared in this scope
35 | for (auto [i, j] : pos) {
| ^~~
jumps.cpp:38:32: error: 'a' was not declared in this scope
38 | ans = max(ans, a[i] + a[j] + s[k]);
| ^
jumps.cpp:38:46: error: 's' was not declared in this scope
38 | ans = max(ans, a[i] + a[j] + s[k]);
| ^
jumps.cpp:38:23: error: 'max' was not declared in this scope
38 | ans = max(ans, a[i] + a[j] + s[k]);
| ^~~
jumps.cpp:41:9: error: 'cout' was not declared in this scope
41 | cout << ans << '\n';
| ^~~~