Problem charges
User Shadow1
Submission Time 2024-02-21 17:54:57
Score 0
Max Time N/A
Max Memory N/A

Compile Error

charges.cpp:32:27: error: template argument 1 is invalid
32 | vector<vector<int> adj(n+1);
| ^
charges.cpp:32:27: error: template argument 2 is invalid
charges.cpp:33:18: error: ‘n’ was not declared in this scope; did you mean ‘yn’?
33 | vector<bool> vis(n+1);
| ^
| yn
charges.cpp: In function ‘bool dfs(int, int)’:
charges.cpp:40:2: error: expected primary-expression before ‘for’
40 | for(auto& s : adj[u])
| ^~~
charges.cpp: In function ‘void solve()’:
charges.cpp:53:4: error: ‘adj’ was not declared in this scope
53 | adj[a].push_back(b);
| ^~~
charges.cpp:56:8: error: ‘i’ was not declared in this scope
56 | if(t[i] == 'Q') {
| ^