garden.cpp:10:17: error: 'INT_MAX' was not declared in this scope
10 | const int INF = INT_MAX - 2;
| ^~~~~~~
garden.cpp:1:1: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
+++ |+#include <climits>
1 | #define pii pair<int,int>
garden.cpp:1:13: error: 'pair' does not name a type
1 | #define pii pair<int,int>
| ^~~~
garden.cpp:12:1: note: in expansion of macro 'pii'
12 | pii minHelp(pii caint) {
| ^~~
garden.cpp:1:13: error: 'pair' does not name a type
1 | #define pii pair<int,int>
| ^~~~
garden.cpp:15:1: note: in expansion of macro 'pii'
15 | pii dfs(vvpii & adj, int v, int P, int c, vvpii & dp) {
| ^~~
garden.cpp:1:13: error: 'pair' has not been declared
1 | #define pii pair<int,int>
| ^~~~
garden.cpp:34:23: note: in expansion of macro 'pii'
34 | bool isInCycle(int K, pii start, pii P0, pii P1) {
| ^~~
garden.cpp:1:17: error: expected ',' or '...' before '<' token
1 | #define pii pair<int,int>
| ^
garden.cpp:34:23: note: in expansion of macro 'pii'
34 | bool isInCycle(int K, pii start, pii P0, pii P1) {
| ^~~
garden.cpp: In function 'bool isInCycle(int, int)':
garden.cpp:35:10: error: 'start' was not declared in this scope
35 | K -= start.first;
| ^~~~~
garden.cpp:38:13: error: 'P0' was not declared in this scope
38 | if (P0.second == 0) return (K % P0.first) == 0;
| ^~
garden.cpp:39:14: error: 'P0' was not declared in this scope
39 | K -= P0.first;
| ^~
garden.cpp:43:13: error: 'P1' was not declared in this scope
43 | if (P1.second == 1) return (K % P1.first) == 0;
| ^~
garden.cpp:44:14: error: 'P1' was not declared in this scope
44 | K -= P1.first;
| ^~
garden.cpp:47:13: error: 'P0' was not declared in this scope
47 | if (P0.second == 0) {
| ^~
garden.cpp: In function 'void count_routes(int, int, int, int (*)[2], int, int*)':
garden.cpp:4:15: error: 'vector' was not declared in this scope
4 | #define vvpii vector<vpii>
| ^~~~~~
garden.cpp:58:5: note: in expansion of macro 'vvpii'
58 | vvpii adj(N);
| ^~~~~
garden.cpp:1:13: error: 'pair' was not declared in this scope
1 | #define pii pair<int,int>
| ^~~~
garden.cpp:2:21: note: in expansion of macro 'pii'
2 | #define vpii vector<pii>
| ^~~
garden.cpp:4:22: note: in expansion of macro 'vpii'
4 | #define vvpii vector<vpii>
| ^~~~
garden.cpp:58:5: note: in expansion of macro 'vvpii'
58 | vvpii adj(N);
| ^~~~~
garden.cpp:1:18: error: expected primary-expression before 'int'
1 | #define pii pair<int,int>
| ^~~
garden.cpp:2:21: note: in expansion of macro 'pii'
2 | #define vpii vector<pii>
| ^~~
garden.cpp:4:22: note: in expansion of macro 'vpii'
4 | #define vvpii vector<vpii>
| ^~~~
garden.cpp:58:5: note: in expansion of macro 'vvpii'
58 | vvpii adj(N);
| ^~~~~
garden.cpp:61:16: error: 'adj' was not declared in this scope
61 | if (sz(adj[a]) < 2) adj[a].push_back({b, i});
| ^~~
garden.cpp:8:22: note: in definition of macro 'sz'
8 | #define sz(x) ((int)(x).size())
| ^
garden.cpp:62:16: error: 'adj' was not declared in this scope
62 | if (sz(adj[b]) < 2) adj[b].push_back({a, i});
| ^~~
garden.cpp:8:22: note: in definition of macro 'sz'
8 | #define sz(x) ((int)(x).size())
| ^
garden.cpp:65:16: error: 'adj' was not declared in this scope
65 | if (sz(adj[i]) != 2) adj[i].push_back(adj[i][0]);
| ^~~
garden.cpp:8:22: note: in definition of macro 'sz'
8 | #define sz(x) ((int)(x).size())
| ^
garden.cpp:1:18: error: expected primary-expression before 'int'
1 | #define pii pair<int,int>
| ^~~
garden.cpp:2:21: note: in expansion of macro 'pii'
2 | #define vpii vector<pii>
| ^~~
garden.cpp:4:22: note: in expansion of macro 'vpii'
4 | #define vvpii vector<vpii>
| ^~~~
garden.cpp:67:5: note: in expansion of macro 'vvpii'
67 | vvpii dp(N, vpii(2, { -1, -1 }));
| ^~~~~
garden.cpp:67:35: error: expected primary-expression before ')' token
67 | vvpii dp(N, vpii(2, { -1, -1 }));
| ^
garden.cpp:69:13: error: 'adj' was not declared in this scope
69 | dfs(adj, v, P, -1, dp);
| ^~~
garden.cpp:69:28: error: 'dp' was not declared in this scope
69 | dfs(adj, v, P, -1, dp);
| ^~
garden.cpp:69:9: error: 'dfs' was not declared in this scope
69 | dfs(adj, v, P, -1, dp);
| ^~~
garden.cpp:6:13: error: 'map' was not declared in this scope
6 | #define mii map<int,int>
| ^~~
garden.cpp:72:5: note: in expansion of macro 'mii'
72 | mii cnts0, cnts1; // 1 für, ja er kommt vom höchstbewerteten zu P
| ^~~
garden.cpp:6:17: error: expected primary-expression before 'int'
6 | #define mii map<int,int>
| ^~~
garden.cpp:72:5: note: in expansion of macro 'mii'
72 | mii cnts0, cnts1; // 1 für, ja er kommt vom höchstbewerteten zu P
| ^~~
garden.cpp:76:9: error: 'tie' was not declared in this scope
76 | tie(steps, last) = dp[v][0];
| ^~~
garden.cpp:76:28: error: 'dp' was not declared in this scope
76 | tie(steps, last) = dp[v][0];
| ^~
garden.cpp:78:20: error: 'max' was not declared in this scope
78 | maxSteps = max(maxSteps, steps);
| ^~~
garden.cpp:79:26: error: 'cnts1' was not declared in this scope
79 | if (last == 1) ++cnts1[steps];
| ^~~~~
garden.cpp:80:16: error: 'cnts0' was not declared in this scope
80 | else ++cnts0[steps];
| ^~~~~
garden.cpp:83:5: error: 'dp' was not declared in this scope
83 | dp[P][0] = minHelp(dfs(adj, adj[P][0].first, P, adj[P][0].second, dp));
| ^~
garden.cpp:83:28: error: 'adj' was not declared in this scope
83 | dp[P][0] = minHelp(dfs(adj, adj[P][0].first, P, adj[P][0].second, dp));
| ^~~
garden.cpp:83:24: error: 'dfs' was not declared in this scope
83 | dp[P][0] = minHelp(dfs(adj, adj[P][0].first, P, adj[P][0].second, dp));
| ^~~
garden.cpp:83:16: error: 'minHelp' was not declared in this scope
83 | dp[P][0] = minHelp(dfs(adj, adj[P][0].first, P, adj[P][0].second, dp));
| ^~~~~~~
garden.cpp:1:18: error: expected primary-expression before 'int'
1 | #define pii pair<int,int>
| ^~~
garden.cpp:90:14: note: in expansion of macro 'pii'
90 | for (pii ele : cnts1) {
| ^~~
garden.cpp:93:9: error: expected primary-expression before 'for'
93 | for (pii ele : cnts0) {
| ^~~
garden.cpp:92:10: error: expected ';' before 'for'
92 | }
| ^
| ;
93 | for (pii ele : cnts0) {
| ~~~
garden.cpp:93:9: error: expected primary-expression before 'for'
93 | for (pii ele : cnts0) {
| ^~~
garden.cpp:92:10: error: expected ')' before 'for'
92 | }
| ^
| )
93 | for (pii ele : cnts0) {
| ~~~
garden.cpp:90:13: note: to match this '('
90 | for (pii ele : cnts1) {
| ^
garden.cpp:1:18: error: expected primary-expression before 'int'
1 | #define pii pair<int,int>
| ^~~
garden.cpp:93:14: note: in expansion of macro 'pii'
93 | for (pii ele : cnts0) {
| ^~~
garden.cpp:96:9: error: 'answer' was not declared in this scope
96 | answer(ans);
| ^~~~~~
garden.cpp:97:5: error: expected primary-expression before '}' token
97 | }
| ^
garden.cpp:96:21: error: expected ')' before '}' token
96 | answer(ans);
| ^
| )
97 | }
| ~
garden.cpp:93:13: note: to match this '('
93 | for (pii ele : cnts0) {
| ^
garden.cpp:97:5: error: expected primary-expression before '}' token
97 | }
| ^