harbingers.java:2: error: illegal character: '#'
#include <bits/stdc++.h>
^
harbingers.java:2: error: class, interface, or enum expected
#include <bits/stdc++.h>
^
harbingers.java:6: error: class, interface, or enum expected
typedef long long ll;
^
harbingers.java:8: error: illegal character: '#'
#define pb push_back
^
harbingers.java:8: error: class, interface, or enum expected
#define pb push_back
^
harbingers.java:9: error: illegal character: '#'
#define sz(x) (int)x.size()
^
harbingers.java:10: error: illegal character: '#'
#define all(x) begin(x),end(x)
^
harbingers.java:11: error: illegal character: '#'
#define lb(x,y) lower_bound(all(x),y)-begin(x)
^
harbingers.java:15: error: class, interface, or enum expected
struct Line {
^
harbingers.java:17: error: class, interface, or enum expected
bool operator<(const Line& o) const { return k < o.k; }
^
harbingers.java:17: error: class, interface, or enum expected
bool operator<(const Line& o) const { return k < o.k; }
^
harbingers.java:18: error: class, interface, or enum expected
bool operator<(ll x) const { return p < x; }
^
harbingers.java:21: error: class, interface, or enum expected
struct LineContainer : multiset<Line, less<>> {
^
harbingers.java:24: error: class, interface, or enum expected
ll div(ll a, ll b) { // floored division
^
harbingers.java:25: error: class, interface, or enum expected
return a / b - ((a ^ b) < 0 && a % b); }
^
harbingers.java:27: error: class, interface, or enum expected
int getTime() { return sz(st); }
^
harbingers.java:27: error: class, interface, or enum expected
int getTime() { return sz(st); }
^
harbingers.java:30: error: class, interface, or enum expected
auto p = st.top(); st.pop();
^
harbingers.java:31: error: class, interface, or enum expected
if (p.first == 0) {
^
harbingers.java:33: error: class, interface, or enum expected
} else if (p.first == 1) {
^
harbingers.java:35: error: class, interface, or enum expected
} else {
^
harbingers.java:36: error: class, interface, or enum expected
auto q = st.top(); st.pop();
^
harbingers.java:37: error: class, interface, or enum expected
auto n = lower_bound(p.second);
^
harbingers.java:38: error: class, interface, or enum expected
n->p = q.second.p;
^
harbingers.java:39: error: class, interface, or enum expected
}
^
harbingers.java:44: error: class, interface, or enum expected
if (x->k == y->k) x->p = x->m > y->m ? inf : -inf;
^
harbingers.java:45: error: class, interface, or enum expected
else x->p = div(y->m - x->m, x->k - y->k);
^
harbingers.java:46: error: class, interface, or enum expected
return x->p >= y->p;
^
harbingers.java:47: error: class, interface, or enum expected
}
^
harbingers.java:50: error: class, interface, or enum expected
bool res = isect(x, y);
^
harbingers.java:51: error: class, interface, or enum expected
st.push({2, *x});
^
harbingers.java:52: error: class, interface, or enum expected
return res;
^
harbingers.java:53: error: class, interface, or enum expected
}
^
harbingers.java:56: error: class, interface, or enum expected
auto z = insert({k, m, 0}), y = z++, x = y;
^
harbingers.java:57: error: class, interface, or enum expected
while (isectR(y, z)) st.push({0, *z}), z = erase(z);
^
harbingers.java:58: error: class, interface, or enum expected
if (x != begin() && isectR(--x, y)) { st.push({0, *y}); isectR(x, y = erase(y)); }
^
harbingers.java:58: error: class, interface, or enum expected
if (x != begin() && isectR(--x, y)) { st.push({0, *y}); isectR(x, y = erase(y)); }
^
harbingers.java:58: error: class, interface, or enum expected
if (x != begin() && isectR(--x, y)) { st.push({0, *y}); isectR(x, y = erase(y)); }
^
harbingers.java:61: error: class, interface, or enum expected
}
^
harbingers.java:64: error: class, interface, or enum expected
auto l = *lower_bound(x);
^
harbingers.java:65: error: class, interface, or enum expected
return l.k * x + l.m;
^
harbingers.java:66: error: class, interface, or enum expected
}
^
harbingers.java:69: error: class, interface, or enum expected
vector<vector<int>> adj;
^
harbingers.java:70: error: class, interface, or enum expected
vector<ll> p;
^
harbingers.java:71: error: class, interface, or enum expected
LineContainer lc;
^
harbingers.java:72: error: class, interface, or enum expected
vector<ll> res;
^
harbingers.java:73: error: class, interface, or enum expected
vector<int> s, v;
^
harbingers.java:74: error: class, interface, or enum expected
void dfs(int u) {
^
harbingers.java:77: error: class, interface, or enum expected
lc.add(p[u], -res[u]);
^
harbingers.java:78: error: class, interface, or enum expected
}
^
harbingers.java:81: error: class, interface, or enum expected
dfs(v);
^
harbingers.java:82: error: class, interface, or enum expected
lc.setTime(t);
^
harbingers.java:83: error: class, interface, or enum expected
}
^
harbingers.java:87: error: class, interface, or enum expected
int N; cin >> N;
^
harbingers.java:88: error: class, interface, or enum expected
adj = vector<vector<int>>(N);
^
harbingers.java:89: error: class, interface, or enum expected
vector<vector<int>> edges;
^
harbingers.java:90: error: class, interface, or enum expected
for (int i = 0; i < N - 1; i++) {
^
harbingers.java:90: error: class, interface, or enum expected
for (int i = 0; i < N - 1; i++) {
^
harbingers.java:90: error: class, interface, or enum expected
for (int i = 0; i < N - 1; i++) {
^
harbingers.java:91: error: class, interface, or enum expected
int u, v, k; cin >> u >> v >> k; u--; v--;
^
harbingers.java:91: error: class, interface, or enum expected
int u, v, k; cin >> u >> v >> k; u--; v--;
^
harbingers.java:91: error: class, interface, or enum expected
int u, v, k; cin >> u >> v >> k; u--; v--;
^
harbingers.java:92: error: class, interface, or enum expected
edges.pb({u, v, k});
^
harbingers.java:93: error: class, interface, or enum expected
adj[u].pb(v);
^
harbingers.java:94: error: class, interface, or enum expected
adj[v].pb(u);
^
harbingers.java:95: error: class, interface, or enum expected
}
^
harbingers.java:97: error: class, interface, or enum expected
v = vector<int>(N);
^
harbingers.java:98: error: class, interface, or enum expected
for (int i = 1; i < sz(s); i++) cin >> s[i] >> v[i];
^
harbingers.java:98: error: class, interface, or enum expected
for (int i = 1; i < sz(s); i++) cin >> s[i] >> v[i];
^
harbingers.java:98: error: class, interface, or enum expected
for (int i = 1; i < sz(s); i++) cin >> s[i] >> v[i];
^
harbingers.java:99: error: class, interface, or enum expected
queue<int> q;
^
harbingers.java:100: error: class, interface, or enum expected
q.push(0);
^
harbingers.java:101: error: class, interface, or enum expected
vector<int> depth(N, 0);
^
harbingers.java:102: error: class, interface, or enum expected
vector<int> srt;
^
harbingers.java:103: error: class, interface, or enum expected
while (!q.empty()) {
^
harbingers.java:104: error: class, interface, or enum expected
int u = q.front(); q.pop();
^
harbingers.java:105: error: class, interface, or enum expected
srt.pb(u);
^
harbingers.java:106: error: class, interface, or enum expected
for (int v : adj[u]) {
^
harbingers.java:108: error: class, interface, or enum expected
depth[v] = depth[u] + 1;
^
harbingers.java:109: error: class, interface, or enum expected
q.push(v);
^
harbingers.java:110: error: class, interface, or enum expected
}
^
harbingers.java:113: error: class, interface, or enum expected
for (auto &edge : edges) {
^
harbingers.java:115: error: class, interface, or enum expected
if (depth[v] > depth[u]) swap(u, v);
^
harbingers.java:116: error: class, interface, or enum expected
p[u] = k;
^
harbingers.java:117: error: class, interface, or enum expected
}
^
harbingers.java:120: error: class, interface, or enum expected
}
^
harbingers.java:122: error: class, interface, or enum expected
res = vector<ll>(N);
^
harbingers.java:123: error: class, interface, or enum expected
dfs(0);
^
harbingers.java:124: error: class, interface, or enum expected
for (int i = 1; i < sz(res); i++) {
^
harbingers.java:124: error: class, interface, or enum expected
for (int i = 1; i < sz(res); i++) {
^
harbingers.java:124: error: class, interface, or enum expected
for (int i = 1; i < sz(res); i++) {
^
harbingers.java:126: error: class, interface, or enum expected
}
^
harbingers.java:131: error: class, interface, or enum expected
cin.tie(nullptr);
^
harbingers.java:132: error: class, interface, or enum expected
rng = mt19937(chrono::steady_clock::now().time_since_epoch().count());
^
harbingers.java:134: error: class, interface, or enum expected
solve();
^
harbingers.java:136: error: class, interface, or enum expected
return 0;
^
harbingers.java:137: error: class, interface, or enum expected
}
^
97 errors