onward.cpp: In function 'bool connect(int, int)':
onward.cpp:7:2: error: 'unordered_set' is not a member of 'std'
std::unordered_set<long long> set;
^
onward.cpp:7:21: error: expected primary-expression before 'long'
std::unordered_set<long long> set;
^
onward.cpp:14:3: error: 'set' was not declared in this scope
set.insert(h);
^
onward.cpp:14:3: note: suggested alternative:
In file included from /usr/include/c++/5/set:61:0,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:86,
from onward.cpp:1:
/usr/include/c++/5/bits/stl_set.h:90:11: note: 'std::set'
class set
^
onward.cpp:22:7: error: 'set' was not declared in this scope
if (set.count(h))return true;
^
onward.cpp:22:7: note: suggested alternative:
In file included from /usr/include/c++/5/set:61:0,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:86,
from onward.cpp:1:
/usr/include/c++/5/bits/stl_set.h:90:11: note: 'std::set'
class set
^
onward.cpp: In function 'bool dfs(int)':
onward.cpp:31:16: warning: range-based 'for' loops only available with -std=c++11 or -std=gnu++11
for (int to : G[idx]) {
^
onward.cpp: In function 'int main()':
onward.cpp:45:23: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &n, &k);
^
onward.cpp:47:22: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%s", str[i]);
^