Problem coin
User justin271828
Submission Time 2025-11-10 19:11:21
Score 0
Max Time N/A
Max Memory N/A

Compile Error

coin.cpp: In function ‘void topo(int)’:
coin.cpp:50:9: error: ‘k’ was not declared in this scope
50 | k = p.f;
| ^
coin.cpp:53:12: error: ‘k’ was not declared in this scope
53 | sorted[k] = true;
| ^
coin.cpp:54:5: error: reference to ‘stack’ is ambiguous
54 | stack.push(k);
| ^~~~~
In file included from /usr/include/c++/9/stack:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:89,
from coin.cpp:1:
/usr/include/c++/9/bits/stl_stack.h:99:11: note: candidates are: ‘template<class _Tp, class _Sequence> class std::stack’
99 | class stack
| ^~~~~
coin.cpp:46:12: note: ‘std::stack<int> stack’
46 | stack<int> stack;
| ^~~~~
coin.cpp: In function ‘int main()’:
coin.cpp:71:13: error: reference to ‘stack’ is ambiguous
71 | while (!stack.empty()