0_0_27848757_9344.cpp:2:10: error: 'max_n' was not declared in this scope
int head[max_n], fa[max_n], dep[max_n], eval[max_n], down[max_n];
^
0_0_27848757_9344.cpp:2:21: error: 'max_n' was not declared in this scope
int head[max_n], fa[max_n], dep[max_n], eval[max_n], down[max_n];
^
0_0_27848757_9344.cpp:2:33: error: 'max_n' was not declared in this scope
int head[max_n], fa[max_n], dep[max_n], eval[max_n], down[max_n];
^
0_0_27848757_9344.cpp:2:46: error: 'max_n' was not declared in this scope
int head[max_n], fa[max_n], dep[max_n], eval[max_n], down[max_n];
^
0_0_27848757_9344.cpp:2:59: error: 'max_n' was not declared in this scope
int head[max_n], fa[max_n], dep[max_n], eval[max_n], down[max_n];
^
0_0_27848757_9344.cpp:3:9: error: 'max_n' was not declared in this scope
int dsu[max_n];
^
0_0_27848757_9344.cpp:5:13: error: 'max_k' was not declared in this scope
int roll[3][max_k], cur, pre = 1;
^
0_0_27848757_9344.cpp:11:9: error: 'max_n' was not declared in this scope
} edges[max_n << 1];
^
0_0_27848757_9344.cpp:17:11: error: 'max_n' was not declared in this scope
} NTedges[max_n];
^
0_0_27848757_9344.cpp:26:1: error: 'priority_queue' does not name a type
priority_queue<node> que;
^
0_0_27848757_9344.cpp: In function 'int addEdge(int, int, int)':
0_0_27848757_9344.cpp:30:5: error: 'edges' was not declared in this scope
edges[idx] = Edge(v, head[u], w);
^
0_0_27848757_9344.cpp:30:26: error: 'head' was not declared in this scope
edges[idx] = Edge(v, head[u], w);
^
0_0_27848757_9344.cpp: In function 'int dsuFind(int)':
0_0_27848757_9344.cpp:37:29: error: 'dsu' was not declared in this scope
int dsuFind(int u) { return dsu[u] < 0 ? u : dsu[u] = dsuFind(dsu[u]); }
^
0_0_27848757_9344.cpp: In function 'bool dsuMerge(int, int)':
0_0_27848757_9344.cpp:44:5: error: 'dsu' was not declared in this scope
dsu[u] = v;
^
0_0_27848757_9344.cpp: In function 'void dfs(int)':
0_0_27848757_9344.cpp:50:19: error: 'head' was not declared in this scope
for (int id = head[u]; ~id; id = edges[id].next) {
^
0_0_27848757_9344.cpp:50:38: error: 'edges' was not declared in this scope
for (int id = head[u]; ~id; id = edges[id].next) {
^
0_0_27848757_9344.cpp:52:18: error: 'fa' was not declared in this scope
if (v == fa[u])
^
0_0_27848757_9344.cpp:54:9: error: 'fa' was not declared in this scope
fa[v] = u;
^
0_0_27848757_9344.cpp:55:9: error: 'dep' was not declared in this scope
dep[v] = dep[u] + 1;
^
0_0_27848757_9344.cpp:56:9: error: 'eval' was not declared in this scope
eval[v] = edges[id].weight;
^
0_0_27848757_9344.cpp: In function 'void read(int&)':
0_0_27848757_9344.cpp:64:23: error: 'getchar' was not declared in this scope
char ch = getchar();
^
0_0_27848757_9344.cpp: In function 'int main()':
0_0_27848757_9344.cpp:76:33: error: 'scanf' was not declared in this scope
while (scanf("%d %d", &n, &m) != EOF) {
^
0_0_27848757_9344.cpp:76:38: error: 'EOF' was not declared in this scope
while (scanf("%d %d", &n, &m) != EOF) {
^
0_0_27848757_9344.cpp:77:14: error: 'head' was not declared in this scope
fill(head, -1), fill(dsu, -1), idx = cnt = sum = 0;
^
0_0_27848757_9344.cpp:77:22: error: 'fill' was not declared in this scope
fill(head, -1), fill(dsu, -1), idx = cnt = sum = 0;
^
0_0_27848757_9344.cpp:77:30: error: 'dsu' was not declared in this scope
fill(head, -1), fill(dsu, -1), idx = cnt = sum = 0;
^
0_0_27848757_9344.cpp:81:50: error: 'NTedges' was not declared in this scope
dsuMerge(u, v) ? addEdge(u, v, w) : (NTedges[cnt++] = NonTreeEdge(u, v, w), 1);
^
0_0_27848757_9344.cpp:85:9: error: 'roll' was not declared in this scope
roll[cur][0] = 1, roll[cur][1] = 0;
^
0_0_27848757_9344.cpp:87:21: error: 'NTedges' was not declared in this scope
int u = NTedges[id].from, v = NTedges[id].to, &sz = roll[2][0] = 1;
^
0_0_27848757_9344.cpp:89:20: error: 'dep' was not declared in this scope
while (dep[u] > dep[v])
^
0_0_27848757_9344.cpp:90:27: error: 'sz' was not declared in this scope
roll[2][++sz] = eval[u], u = fa[u];
^
0_0_27848757_9344.cpp:90:33: error: 'eval' was not declared in this scope
roll[2][++sz] = eval[u], u = fa[u];
^
0_0_27848757_9344.cpp:90:46: error: 'fa' was not declared in this scope
roll[2][++sz] = eval[u], u = fa[u];
^
0_0_27848757_9344.cpp:91:20: error: 'dep' was not declared in this scope
while (dep[u] < dep[v])
^
0_0_27848757_9344.cpp:92:27: error: 'sz' was not declared in this scope
roll[2][++sz] = eval[v], v = fa[v];
^
0_0_27848757_9344.cpp:92:33: error: 'eval' was not declared in this scope
roll[2][++sz] = eval[v], v = fa[v];
^
0_0_27848757_9344.cpp:92:46: error: 'fa' was not declared in this scope
roll[2][++sz] = eval[v], v = fa[v];
^
0_0_27848757_9344.cpp:94:27: error: 'sz' was not declared in this scope
roll[2][++sz] = eval[u];
^
0_0_27848757_9344.cpp:94:33: error: 'eval' was not declared in this scope
roll[2][++sz] = eval[u];
^
0_0_27848757_9344.cpp:96:21: error: 'fa' was not declared in this scope
u = fa[u], v = fa[v];
^
0_0_27848757_9344.cpp:99:21: error: 'que' was not declared in this scope
while (!que.empty())
^
0_0_27848757_9344.cpp:101:34: error: 'sz' was not declared in this scope
for (int i = 1; i <= sz; i++) {
^
0_0_27848757_9344.cpp:102:17: error: 'down' was not declared in this scope
down[i] = 1;
^
0_0_27848757_9344.cpp:103:17: error: 'que' was not declared in this scope
que.push(node(roll[2][i] + roll[pre][1], i));
^
0_0_27848757_9344.cpp:105:55: error: 'que' was not declared in this scope
for (int& i = roll[cur][0] = 0; i < k && !que.empty();) {
^
0_0_27848757_9344.cpp:109:21: error: 'down' was not declared in this scope
if (down[pos] < roll[pre][0]) {
^
0_0_27848757_9344.cpp:109:26: error: 'pos' was not declared in this scope
if (down[pos] < roll[pre][0]) {
^
0_0_27848757_9344.cpp:117:13: error: 'tmp' was not declared in this scope
tmp += sum - roll[cur][i];
^
0_0_27848757_9344.cpp:120:44: error: 'printf' was not declared in this scope
printf("Case #%d: %u\n", ++cas, ans);
^
|