/in/foo.cc: In member function 'int Graph::get_label(std::__cxx11::string)':
/in/foo.cc:22:9: error: 'unordered_set' was not declared in this scope
unordered_set<string> visited;
^~~~~~~~~~~~~
/in/foo.cc:22:29: error: expected primary-expression before '>' token
unordered_set<string> visited;
^
/in/foo.cc:22:31: error: 'visited' was not declared in this scope
unordered_set<string> visited;
^~~~~~~
/in/foo.cc:27:18: error: expected unqualified-id before '[' token
auto [current_player, label] = q.front();
^
/in/foo.cc:30:17: error: 'current_player' was not declared in this scope
if (current_player == "Xiaodao") {
^~~~~~~~~~~~~~
/in/foo.cc:31:24: error: 'label' was not declared in this scope
return label;
^~~~~
/in/foo.cc:34:30: error: 'current_player' was not declared in this scope
if (visited.find(current_player) == visited.end()) {
^~~~~~~~~~~~~~
/in/foo.cc:38:39: error: 'label' was not declared in this scope
q.push({teammate, label + 1});
^~~~~
/in/foo.cc:38:49: error: no matching function for call to 'std::queue<std::pair<std::__cxx11::basic_string<char>, int> >::push(<brace-enclosed initializer list>)'
q.push({teammate, label + 1});
^
In file included from /usr/include/c++/6/queue:64:0,
from /in/foo.cc:3:
/usr/include/c++/6/bits/stl_queue.h:242:7: note: candidate: void std::queue<_Tp, _Sequence>::push(const value_type&) [with _Tp = std::pair<std::__cxx11::basic_string<char>, int>; _Sequence = std::deque<std::pair<std::__cxx11::basic_string<char>, int>, std::allocator<std::pair<std::__cxx11::basic_string<char>, int> > >; std::queue<_Tp, _Sequence>::value_type = std::pair<std::__cxx11::basic_string<char>, int>]
push(const value_type& __x)
^~~~
/usr/include/c++/6/bits/stl_queue.h:242:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type& {aka const std::pair<std::__cxx11::basic_string<char>, int>&}'
/usr/include/c++/6/bits/stl_queue.h:247:7: note: candidate: void std::queue<_Tp, _Sequence>::push(std::queue<_Tp, _Sequence>::value_type&&) [with _Tp = std::pair<std::__cxx11::basic_string<char>, int>; _Sequence = std::deque<std::pair<std::__cxx11::basic_string<char>, int>, std::allocator<std::pair<std::__cxx11::basic_string<char>, int> > >; std::queue<_Tp, _Sequence>::value_type = std::pair<std::__cxx11::basic_string<char>, int>]
push(value_type&& __x)
^~~~
/usr/include/c++/6/bits/stl_queue.h:247:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::queue<std::pair<std::__cxx11::basic_string<char>, int> >::value_type&& {aka std::pair<std::__cxx11::basic_string<char>, int>&&}'
/in/foo.cc: In function 'int main()':
/in/foo.cc:65:22: error: expected unqualified-id before '[' token
for (const auto& [player, _] : graph.teammates) {
^
/in/foo.cc:65:22: error: expected ';' before '[' token
/in/foo.cc:65:23: error: 'player' was not declared in this scope
for (const auto& [player, _] : graph.teammates) {
^~~~~~
/in/foo.cc:65:31: error: '_' was not declared in this scope
for (const auto& [player, _] : graph.teammates) {
^
/in/foo.cc: In lambda function:
/in/foo.cc:65:34: error: expected '{' before ':' token
for (const auto& [player, _] : graph.teammates) {
^
/in/foo.cc: In function 'int main()':
/in/foo.cc:65:34: error: expected ';' before ':' token
/in/foo.cc:65:34: error: expected primary-expression before ':' token
/in/foo.cc:65:34: error: expected ')' before ':' token
/in/foo.cc:65:34: error: expected primary-expression before ':' token
/in/foo.cc:71:22: error: expected unqualified-id before '[' token
for (const auto& [player, _] : player_labels) {
^
/in/foo.cc:71:22: error: expected ';' before '[' token
/in/foo.cc:71:23: error: 'player' was not declared in this scope
for (const auto& [player, _] : player_labels) {
^~~~~~
/in/foo.cc:71:31: error: '_' was not declared in this scope
for (const auto& [player, _] : player_labels) {
^
/in/foo.cc: In lambda function:
/in/foo.cc:71:34: error: expected '{' before ':' token
for (const auto& [player, _] : player_labels) {
^
/in/foo.cc: In function 'int main()':
/in/foo.cc:71:34: error: expected ';' before ':' token
/in/foo.cc:71:34: error: expected primary-expression before ':' token
/in/foo.cc:71:34: error: expected ')' before ':' token
/in/foo.cc:71:34: error: expected primary-expression before ':' token