Submission #1125281

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
11252812024-12-09 05:20:28SulATraffic (IOI10_traffic)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
//#pragma GCC target("popcnt")
using namespace __gnu_pbds;
using namespace std;
using ordered_set = tree<int, null_type, less_equal<>, rb_tree_tag, tree_order_statistics_node_update>;
#define popcount __builtin_popcountll
#define all(a) (a).begin(), (a).end()
vector<int> adj[1'000'000];
long long sum[1'000'000], dp[1'000'000], out[1'000'000];
void dfs(int u = 0, int p = -1) {
for (int v : adj[u]) if (v != p) {
dfs(v, u);
sum[u] += sum[v];
dp[u] += dp[v] + sum[v];
}
}
void dfs2(int u = 0, int p = -1) {
for (int v : adj[u]) if (v != p) {
out[v] = (out[u] + dp[u]) - (dp[v] + sum[v]) + (sum[0] - sum[v]);
dfs2(v, u);
}
}
int LocateCentre(int n, vector<int> p, vector<int> s, vector<int> d) {
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

/usr/bin/ld: /tmp/ccW5Kg9c.o: in function `main':
grader.cpp:(.text.startup+0xef): undefined reference to `LocateCentre(int, int*, int*, int*)'
collect2: error: ld returned 1 exit status