race.cpp:1:17: error: stray '#' in program
1 | duma no cay vai #include <bits/stdc++.h>
| ^
race.cpp:1:1: error: 'duma' does not name a type
1 | duma no cay vai #include <bits/stdc++.h>
| ^~~~
race.cpp: In function 'int main()':
race.cpp:13:5: error: 'ios_base' has not been declared
13 | ios_base::sync_with_stdio(0); cin.tie(0);
| ^~~~~~~~
race.cpp:13:35: error: 'cin' was not declared in this scope
13 | ios_base::sync_with_stdio(0); cin.tie(0);
| ^~~
race.cpp:23:5: error: 'vector' was not declared in this scope
23 | vector<vector<int>> e(N, vector<int>(N));
| ^~~~~~
race.cpp:23:19: error: expected primary-expression before 'int'
23 | vector<vector<int>> e(N, vector<int>(N));
| ^~~
race.cpp:28:13: error: 'e' was not declared in this scope
28 | e[i][j] = 1;
| ^
race.cpp:33:26: error: expected primary-expression before 'int'
33 | vector<vector<vector<int>>> dp(N, vector<vector<int>>(N, vector<int>(2, -inf)));
| ^~~
race.cpp:34:26: error: expected primary-expression before 'int'
34 | vector<vector<vector<int>>> max_dp(N, vector<vector<int>>(N, vector<int>(2, -inf)));
| ^~~
race.cpp:40:9: error: 'dp' was not declared in this scope
40 | dp[i][i][0] = dp[i][i][1] = max_dp[i][i][0] = max_dp[i][i][1] = 0;
| ^~
race.cpp:40:37: error: 'max_dp' was not declared in this scope
40 | dp[i][i][0] = dp[i][i][1] = max_dp[i][i][0] = max_dp[i][i][1] = 0;
| ^~~~~~
race.cpp:43:19: error: expected primary-expression before 'int'
43 | vector<vector<int>> to(2, vector<int>(N));
| ^~~
race.cpp:45:9: error: 'to' was not declared in this scope
45 | to[0][i] = (i + 1) % N;
| ^~
race.cpp: In lambda function:
race.cpp:50:12: error: 'e' was not declared in this scope
50 | if(e[l][r]){
| ^
race.cpp:51:22: error: 'dp' was not declared in this scope
51 | maximize(dp[l][r][k], 1); //base-case
| ^~
race.cpp:52:22: error: 'max_dp' was not declared in this scope
52 | maximize(max_dp[l][r][k], max_dp[r][to[k][l]][k ^ 1] + 1); //case go back but not cut [l...r - 1]
| ^~~~~~
race.cpp:52:49: error: 'to' was not declared in this scope
52 | maximize(max_dp[l][r][k], max_dp[r][to[k][l]][k ^ 1] + 1); //case go back but not cut [l...r - 1]
| ^~
race.cpp:55:23: error: 'to' was not declared in this scope
55 | for(int nxt = to[k][l]; nxt != r; nxt = to[k][nxt]){
| ^~
race.cpp:56:16: error: 'e' was not declared in this scope
56 | if(e[l][nxt]){
| ^
race.cpp:57:26: error: 'dp' was not declared in this scope
57 | maximize(dp[l][r][k], dp[l][nxt][k] + dp[nxt][r][k]);
| ^~
race.cpp:58:26: error: 'max_dp' was not declared in this scope
58 | maximize(max_dp[l][r][k], dp[l][nxt][k] + max_dp[nxt][r][k]);
| ^~~~~~
race.cpp:62:18: error: 'max_dp' was not declared in this scope
62 | maximize(max_dp[l][r][k], max_dp[l][to[k ^ 1][r]][k]);
| ^~~~~~
race.cpp:62:45: error: 'to' was not declared in this scope
62 | maximize(max_dp[l][r][k], max_dp[l][to[k ^ 1][r]][k]);
| ^~
race.cpp: In function 'int main()':
race.cpp:72:5: error: 'pair' was not declared in this scope
72 | pair<int, int> res = {0, 0};
| ^~~~
race.cpp:72:10: error: expected primary-expression before 'int'
72 | pair<int, int> res = {0, 0};
| ^~~
race.cpp:76:26: error: 'res' was not declared in this scope
76 | maximize(res, make_pair(max_dp[i][j][k], i));
| ^~~
race.cpp:76:41: error: 'max_dp' was not declared in this scope
76 | maximize(res, make_pair(max_dp[i][j][k], i));
| ^~~~~~
race.cpp:76:31: error: 'make_pair' was not declared in this scope
76 | maximize(res, make_pair(max_dp[i][j][k], i));
| ^~~~~~~~~
race.cpp:82:9: error: 'cout' was not declared in this scope
82 | cout << res.first << ' ' << res.second + 1 << '\n';
| ^~~~
race.cpp:82:17: error: 'res' was not declared in this scope
82 | cout << res.first << ' ' << res.second + 1 << '\n';
| ^~~
race.cpp:89:20: error: 'dp' was not declared in this scope
89 | if(dp[i][j][k] <= 0) continue;
| ^~
race.cpp:91:29: error: 'to' was not declared in this scope
91 | int bestS = to[k][j];
| ^~
race.cpp:92:38: error: 'e' was not declared in this scope
92 | while(bestS != i && !e[bestS][i]) bestS = to[k][bestS];
| ^
race.cpp:99:24: error: 'e' was not declared in this scope
99 | if(e[j][candidate]){ //S -> i -> ... -> j -> T -> ...
| ^
race.cpp:100:40: error: 'max_dp' was not declared in this scope
100 | int last = max(max_dp[to[k][bestS]][candidate][k ^ 1], max_dp[candidate][to[k ^ 1][i]][k]); //some last paths
| ^~~~~~
race.cpp:100:36: error: 'max' was not declared in this scope
100 | int last = max(max_dp[to[k][bestS]][candidate][k ^ 1], max_dp[candidate][to[k ^ 1][i]][k]); //some last paths
| ^~~
race.cpp:101:44: error: 'dp' was not declared in this scope
101 | int solution = 1 + dp[i][j][k] + 1 + last;
| ^~
race.cpp:102:25: error: 'cout' was not declared in this scope
102 | cout << bestS << ' ' << i << ' ' << j << ' ' << candidate << '\n';
| ^~~~
race.cpp:110:34: error: 'res' was not declared in this scope
110 | maximize(res, {solution, bestS});
| ^~~
race.cpp:117:5: error: 'cout' was not declared in this scope
117 | cout << res.first << ' ' << res.second + 1 << '\n';
| ^~~~
race.cpp:117:13: error: 'res' was not declared in this scope
117 | cout << res.first << ' ' << res.second + 1 << '\n';
| ^~~
race.cpp:32:15: warning: unused variable 'inf' [-Wunused-variable]
32 | const int inf = 1e9;
| ^~~