factories.cpp:4:19: error: two or more data types in declaration of 'N'
4 | typedef long long int
| ^~~
factories.cpp:4:19: error: two or more data types in declaration of 'L'
factories.cpp:4:19: error: two or more data types in declaration of 'Q'
factories.cpp:4:19: error: two or more data types in declaration of 'I'
factories.cpp:6:13: error: 'N' was not declared in this scope
6 | int n, q, h[N], par[N][L], spt[N][L], dis[N];
| ^
factories.cpp:6:21: error: 'N' was not declared in this scope
6 | int n, q, h[N], par[N][L], spt[N][L], dis[N];
| ^
factories.cpp:6:24: error: 'L' was not declared in this scope
6 | int n, q, h[N], par[N][L], spt[N][L], dis[N];
| ^
factories.cpp:6:32: error: 'N' was not declared in this scope
6 | int n, q, h[N], par[N][L], spt[N][L], dis[N];
| ^
factories.cpp:6:35: error: 'L' was not declared in this scope
6 | int n, q, h[N], par[N][L], spt[N][L], dis[N];
| ^
factories.cpp:6:43: error: 'N' was not declared in this scope
6 | int n, q, h[N], par[N][L], spt[N][L], dis[N];
| ^
factories.cpp:7:28: error: 'N' was not declared in this scope
7 | vector<pair<int, int>> adj[N];
| ^
factories.cpp: In function 'void dfs(int, int)':
factories.cpp:10:20: error: 'adj' was not declared in this scope
10 | for (auto [u, w]: adj[v])
| ^~~
factories.cpp:12:4: error: 'par' was not declared in this scope; did you mean '__pstl::execution::v1::par'?
12 | par[u][0] = v;
| ^~~
| __pstl::execution::v1::par
In file included from /usr/include/c++/10/pstl/glue_algorithm_defs.h:15,
from /usr/include/c++/10/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from factories.cpp:1:
/usr/include/c++/10/pstl/execution_defs.h:111:27: note: '__pstl::execution::v1::par' declared here
111 | constexpr parallel_policy par{};
| ^~~
factories.cpp:13:4: error: 'spt' was not declared in this scope
13 | spt[u][0] = w;
| ^~~
factories.cpp:14:4: error: 'h' was not declared in this scope
14 | h[u] = h[v] + 1;
| ^
factories.cpp: In function 'int distance(int, int)':
factories.cpp:21:6: error: 'h' was not declared in this scope
21 | if (h[v] < h[u]) swap(v, u);
| ^
factories.cpp:22:22: error: 'L' was not declared in this scope
22 | for (int i = 0; i < L; i++)
| ^
factories.cpp:23:19: error: 'h' was not declared in this scope
23 | if ((1 << i) & (h[v] - h[u])) {
| ^
factories.cpp:24:11: error: 'spt' was not declared in this scope
24 | ans += spt[v][i];
| ^~~
factories.cpp:25:8: error: 'par' was not declared in this scope; did you mean '__pstl::execution::v1::par'?
25 | v = par[v][i];
| ^~~
| __pstl::execution::v1::par
In file included from /usr/include/c++/10/pstl/glue_algorithm_defs.h:15,
from /usr/include/c++/10/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from factories.cpp:1:
/usr/include/c++/10/pstl/execution_defs.h:111:27: note: '__pstl::execution::v1::par' declared here
111 | constexpr parallel_policy par{};
| ^~~
factories.cpp:29:15: error: 'L' was not declared in this scope
29 | for (int i = L - 1; i >= 0; i--)
| ^
factories.cpp:30:7: error: 'par' was not declared in this scope; did you mean '__pstl::execution::v1::par'?
30 | if (par[v][i] != par[u][i]) {
| ^~~
| __pstl::execution::v1::par
In file included from /usr/include/c++/10/pstl/glue_algorithm_defs.h:15,
from /usr/include/c++/10/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from factories.cpp:1:
/usr/include/c++/10/pstl/execution_defs.h:111:27: note: '__pstl::execution::v1::par' declared here
111 | constexpr parallel_policy par{};
| ^~~
factories.cpp:31:11: error: 'spt' was not declared in this scope
31 | ans += spt[v][i] + spt[u][i];
| ^~~
factories.cpp:35:15: error: 'spt' was not declared in this scope
35 | return ans + spt[v][0] + spt[u][0];
| ^~~
factories.cpp: In function 'void Init(int, int*, int*, int*)':
factories.cpp:41:3: error: 'adj' was not declared in this scope
41 | adj[A[i] + 1].push_back({B[i] + 1, D[i]});
| ^~~
factories.cpp:46:22: error: 'L' was not declared in this scope
46 | for (int i = 1; i < L; i++)
| ^
factories.cpp:48:4: error: 'par' was not declared in this scope; did you mean '__pstl::execution::v1::par'?
48 | par[j][i] = par[par[j][i - 1]][i - 1];
| ^~~
| __pstl::execution::v1::par
In file included from /usr/include/c++/10/pstl/glue_algorithm_defs.h:15,
from /usr/include/c++/10/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from factories.cpp:1:
/usr/include/c++/10/pstl/execution_defs.h:111:27: note: '__pstl::execution::v1::par' declared here
111 | constexpr parallel_policy par{};
| ^~~
factories.cpp:49:4: error: 'spt' was not declared in this scope
49 | spt[j][i] = spt[j][i - 1] + spt[par[j][i - 1]][i - 1];
| ^~~
factories.cpp:51:25: error: 'dis' was not declared in this scope; did you mean 'dfs'?
51 | for (int i = 0; i < N; dis[i++] = I);
| ^~~
| dfs
factories.cpp:51:36: error: 'I' was not declared in this scope
51 | for (int i = 0; i < N; dis[i++] = I);
| ^
factories.cpp: At global scope:
factories.cpp:54:5: error: ambiguating new declaration of 'int Query(int, int*, int, int*)'
54 | int Query(int S, int X[], int T, int Y[]) {
| ^~~~~
In file included from factories.cpp:2:
factories.h:5:11: note: old declaration 'long long int Query(int, int*, int, int*)'
5 | long long Query(int S, int X[], int T, int Y[]);
| ^~~~~
factories.cpp: In function 'int Query(int, int*, int, int*)':
factories.cpp:55:10: error: 'Q' was not declared in this scope
55 | if (S < Q) {
| ^
factories.cpp:56:13: error: 'I' was not declared in this scope
56 | int ans = I;
| ^
factories.cpp:65:3: error: 'dis' was not declared in this scope; did you mean 'dfs'?
65 | dis[X[i] + 1] = 0;
| ^~~
| dfs
factories.cpp:70:7: error: 'dis' was not declared in this scope; did you mean 'dfs'?
70 | if (dis[v] < d) continue;
| ^~~
| dfs
factories.cpp:72:21: error: 'adj' was not declared in this scope
72 | for (auto [u, w]: adj[v])
| ^~~
factories.cpp:73:8: error: 'dis' was not declared in this scope; did you mean 'dfs'?
73 | if (dis[u] > d + w) {
| ^~~
| dfs
factories.cpp:75:23: error: no matching function for call to 'std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> > >::push(<brace-enclosed initializer list>)'
75 | pq.push({d + w, u});
| ^
In file included from /usr/include/c++/10/queue:64,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
from factories.cpp:1:
/usr/include/c++/10/bits/stl_queue.h:640:7: note: candidate: 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = std::pair<int, int>]'
640 | push(const value_type& __x)
| ^~~~
/usr/include/c++/10/bits/stl_queue.h:640:30: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type&' {aka 'const std::pair<int, int>&'}
640 | push(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_queue.h:648:7: note: candidate: 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(std::priority_queue<_Tp, _Sequence, _Compare>::value_type&&) [with _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = std::pair<int, int>]'
648 | push(value_type&& __x)
| ^~~~
/usr/include/c++/10/bits/stl_queue.h:648:25: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> > >::value_type&&' {aka 'std::pair<int, int>&&'}
648 | push(value_type&& __x)
| ~~~~~~~~~~~~~^~~
factories.cpp:79:12: error: 'I' was not declared in this scope
79 | int ans = I;
| ^
factories.cpp:80:45: error: 'dis' was not declared in this scope; did you mean 'dfs'?
80 | for (int i = 0; i < T; i++) ans = min(ans, dis[Y[i] + 1]);
| ^~~
| dfs
factories.cpp:81:22: error: 'N' was not declared in this scope
81 | for (int i = 0; i < N; dis[i++] = I);
| ^
factories.cpp:81:25: error: 'dis' was not declared in this scope; did you mean 'dfs'?
81 | for (int i = 0; i < N; dis[i++] = I);
| ^~~
| dfs