glo.java:2: error: illegal character: '#'
#include <bits/stdc++.h>
^
glo.java:2: error: class, interface, or enum expected
#include <bits/stdc++.h>
^
glo.java:4: error: class, interface, or enum expected
typedef long long ll;
^
glo.java:6: error: class, interface, or enum expected
const int MIN = -2000000001;
^
glo.java:7: error: class, interface, or enum expected
const int MAX = 2000000001;
^
glo.java:9: error: class, interface, or enum expected
int n, x;
^
glo.java:10: error: class, interface, or enum expected
const int N = 200005;
^
glo.java:11: error: class, interface, or enum expected
int tree[4 * N][2];
^
glo.java:13: error: class, interface, or enum expected
int getMax(int from, int to, int a, int b, int node, int treeNum) {
^
glo.java:15: error: class, interface, or enum expected
if (from <= a && b <= to) return tree[node][treeNum];
^
glo.java:17: error: class, interface, or enum expected
int mid = (a + b) / 2;
^
glo.java:18: error: class, interface, or enum expected
int res = -1;
^
glo.java:19: error: class, interface, or enum expected
if (from <= mid) res = max(res, getMax(from, to, a, mid, node * 2, treeNum));
^
glo.java:20: error: class, interface, or enum expected
if (to > mid) res = max(res, getMax(from, to, mid +1, b, node * 2 + 1, treeNum));
^
glo.java:22: error: class, interface, or enum expected
return res;
^
glo.java:23: error: class, interface, or enum expected
}
^
glo.java:28: error: class, interface, or enum expected
return;
^
glo.java:29: error: class, interface, or enum expected
}
^
glo.java:32: error: class, interface, or enum expected
if (i <= mid) insertMax(i, num, a, mid, node * 2, treeNum);
^
glo.java:33: error: class, interface, or enum expected
else insertMax(i, num, mid + 1, b, node * 2 + 1, treeNum);
^
glo.java:34: error: class, interface, or enum expected
tree[node][treeNum] = max(tree[node * 2][treeNum], tree[node * 2 + 1][treeNum]);
^
glo.java:35: error: class, interface, or enum expected
}
^
glo.java:39: error: class, interface, or enum expected
cin.tie(0);
^
glo.java:41: error: class, interface, or enum expected
cin >> n >> x;
^
glo.java:42: error: class, interface, or enum expected
vector<int> v(n);
^
glo.java:43: error: class, interface, or enum expected
for (int i = 0; i < n; i++) cin >> v[i];
^
glo.java:43: error: class, interface, or enum expected
for (int i = 0; i < n; i++) cin >> v[i];
^
glo.java:43: error: class, interface, or enum expected
for (int i = 0; i < n; i++) cin >> v[i];
^
glo.java:44: error: class, interface, or enum expected
if (n == 1) {
^
glo.java:46: error: class, interface, or enum expected
return 0;
^
glo.java:47: error: class, interface, or enum expected
}
^
glo.java:50: error: class, interface, or enum expected
set<int> all;
^
glo.java:51: error: class, interface, or enum expected
map<int, int> mapTo;
^
glo.java:52: error: class, interface, or enum expected
for (int i = 0; i < n; i++) all.insert(v[i]);
^
glo.java:52: error: class, interface, or enum expected
for (int i = 0; i < n; i++) all.insert(v[i]);
^
glo.java:52: error: class, interface, or enum expected
for (int i = 0; i < n; i++) all.insert(v[i]);
^
glo.java:53: error: class, interface, or enum expected
int cur = 0;
^
glo.java:54: error: class, interface, or enum expected
for (int i : all) {
^
glo.java:56: error: class, interface, or enum expected
cur++;
^
glo.java:57: error: class, interface, or enum expected
}
^
glo.java:60: error: class, interface, or enum expected
vector<int> org(v.begin(), v.end());
^
glo.java:61: error: class, interface, or enum expected
set<array<int, 2>> orgAndNew;
^
glo.java:62: error: class, interface, or enum expected
for (int i = 0; i < n; i++) {
^
glo.java:62: error: class, interface, or enum expected
for (int i = 0; i < n; i++) {
^
glo.java:62: error: class, interface, or enum expected
for (int i = 0; i < n; i++) {
^
glo.java:64: error: class, interface, or enum expected
orgAndNew.insert({org[i], v[i]});
^
glo.java:65: error: class, interface, or enum expected
}
^
glo.java:67: error: class, interface, or enum expected
for (int i = 0; i < n; i++) {
^
glo.java:67: error: class, interface, or enum expected
for (int i = 0; i < n; i++) {
^
glo.java:69: error: class, interface, or enum expected
it--;
^
glo.java:70: error: class, interface, or enum expected
getsTo[v[i]] = (*it)[1];
^
glo.java:71: error: class, interface, or enum expected
}
^
glo.java:73: error: class, interface, or enum expected
for (int i = 0; i < n; i++) {
^
glo.java:73: error: class, interface, or enum expected
for (int i = 0; i < n; i++) {
^
glo.java:75: error: class, interface, or enum expected
insertMax(v[i], 1 + getMax(0, v[i] - 1, 0, N - 1, 1, 0), 0, N - 1, 1, 0);
^
glo.java:76: error: class, interface, or enum expected
insertMax(v[i], 1 + getMax(0, v[i] - 1, 0, N - 1, 1, 1), 0, N - 1, 1, 1);
^
glo.java:77: error: class, interface, or enum expected
}
^
glo.java:80: error: class, interface, or enum expected
}
^
58 errors