Main.java:1: error: illegal character: '#'
#include<bits/stdc++.h>
^
Main.java:1: error: class, interface, or enum expected
#include<bits/stdc++.h>
^
Main.java:4: error: class, interface, or enum expected
const int N = 2e6 + 7;
^
Main.java:5: error: class, interface, or enum expected
const int inf = 1e9 + 7;
^
Main.java:6: error: class, interface, or enum expected
const long long infll = 1e18 + 7;
^
Main.java:7: error: class, interface, or enum expected
typedef pair< float, int > ii;
^
Main.java:9: error: class, interface, or enum expected
int n, q;
^
Main.java:10: error: class, interface, or enum expected
int a[N];
^
Main.java:12: error: class, interface, or enum expected
long long GetResult() {
^
Main.java:14: error: class, interface, or enum expected
long long res = -infll;
^
Main.java:15: error: class, interface, or enum expected
for (int i = 1; i <= n; i++) {
^
Main.java:15: error: class, interface, or enum expected
for (int i = 1; i <= n; i++) {
^
Main.java:15: error: class, interface, or enum expected
for (int i = 1; i <= n; i++) {
^
Main.java:17: error: class, interface, or enum expected
int minValue = inf;
^
Main.java:18: error: class, interface, or enum expected
for (int j = i; j > 0; j--) {
^
Main.java:18: error: class, interface, or enum expected
for (int j = i; j > 0; j--) {
^
Main.java:18: error: class, interface, or enum expected
for (int j = i; j > 0; j--) {
^
Main.java:20: error: class, interface, or enum expected
minValue = min(minValue, a[j]);
^
Main.java:21: error: class, interface, or enum expected
dp[i] = max(dp[i], dp[j - 1] + maxValue - minValue);
^
Main.java:22: error: class, interface, or enum expected
res = max(res, dp[i]);
^
Main.java:23: error: class, interface, or enum expected
}
^
Main.java:27: error: class, interface, or enum expected
}
^
Main.java:30: error: class, interface, or enum expected
ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
^
Main.java:30: error: class, interface, or enum expected
ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
^
Main.java:31: error: class, interface, or enum expected
cin >> n >> q;
^
Main.java:32: error: class, interface, or enum expected
for (int i = 1; i <= n; i++) cin >> a[i];
^
Main.java:32: error: class, interface, or enum expected
for (int i = 1; i <= n; i++) cin >> a[i];
^
Main.java:32: error: class, interface, or enum expected
for (int i = 1; i <= n; i++) cin >> a[i];
^
Main.java:33: error: class, interface, or enum expected
while (q--) {
^
Main.java:34: error: class, interface, or enum expected
int l, r, v; cin >> l >> r >> v;
^
Main.java:35: error: class, interface, or enum expected
for (int i = l; i <= r; i++) a[i] += v;
^
Main.java:35: error: class, interface, or enum expected
for (int i = l; i <= r; i++) a[i] += v;
^
Main.java:35: error: class, interface, or enum expected
for (int i = l; i <= r; i++) a[i] += v;
^
Main.java:36: error: class, interface, or enum expected
cout << GetResult();
^
Main.java:37: error: class, interface, or enum expected
if (q > 0) cout << '\n';
^
Main.java:38: error: class, interface, or enum expected
}
^
Main.java:40: error: class, interface, or enum expected
}
^
37 errors