Problem dynamicdag
User YH
Submission Time 2025-02-24 21:21:56
Score 0
Max Time N/A
Max Memory N/A

Compile Error

dynamicdag.cpp: In function ‘int main()’:
dynamicdag.cpp:20:13: error: conflicting declaration ‘std::queue<int> q’
20 | queue<int> q;
| ^
dynamicdag.cpp:11:9: note: previous declaration as ‘int q’
11 | int n, q;
| ^
dynamicdag.cpp:35:26: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
35 | back[v].emplace_back[u];
| ^
dynamicdag.cpp:36:27: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
36 | front[u].emplace_back[v];
| ^
dynamicdag.cpp:39:7: error: request for member ‘emplace’ in ‘q’, which is of non-class type ‘int’
39 | q.emplace(v);
| ^~~~~~~
dynamicdag.cpp:41:15: error: request for member ‘empty’ in ‘q’, which is of non-class type ‘int’
41 | while (!q.empty()) {
| ^~~~~