xorsort.cpp: In function 'void dfs(ll)':
xorsort.cpp:50:16: error: reference to 'visit' is ambiguous
50 | void dfs(ll v){visit[v] = 1;for(auto x:adj[v]){if(!visit[x]){depth[x] = depth[v] + 1;dfs(x);}}}
| ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:133,
from xorsort.cpp:1:
/usr/include/c++/10/variant:1700:5: note: candidates are: 'template<class _Visitor, class ... _Variants> constexpr decltype(auto) std::visit(_Visitor&&, _Variants&& ...)'
1700 | visit(_Visitor&& __visitor, _Variants&&... __variants)
| ^~~~~
xorsort.cpp:32:5: note: 'std::vector<long long int> visit'
32 | vll visit,dist,taken;
| ^~~~~
xorsort.cpp:50:52: error: reference to 'visit' is ambiguous
50 | void dfs(ll v){visit[v] = 1;for(auto x:adj[v]){if(!visit[x]){depth[x] = depth[v] + 1;dfs(x);}}}
| ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:133,
from xorsort.cpp:1:
/usr/include/c++/10/variant:1700:5: note: candidates are: 'template<class _Visitor, class ... _Variants> constexpr decltype(auto) std::visit(_Visitor&&, _Variants&& ...)'
1700 | visit(_Visitor&& __visitor, _Variants&&... __variants)
| ^~~~~
xorsort.cpp:32:5: note: 'std::vector<long long int> visit'
32 | vll visit,dist,taken;
| ^~~~~
xorsort.cpp: In function 'void bfs(ll)':
xorsort.cpp:51:16: error: reference to 'visit' is ambiguous
51 | void bfs(ll s){visit[s] = 1;queue<ll>q;q.push(s);while(!q.empty()){ll u = q.front();ps(u);q.pop();for(auto x:adj[u]){if(!visit[x]){visit[x] = 1;q.push(x);}}}}
| ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:133,
from xorsort.cpp:1:
/usr/include/c++/10/variant:1700:5: note: candidates are: 'template<class _Visitor, class ... _Variants> constexpr decltype(auto) std::visit(_Visitor&&, _Variants&& ...)'
1700 | visit(_Visitor&& __visitor, _Variants&&... __variants)
| ^~~~~
xorsort.cpp:32:5: note: 'std::vector<long long int> visit'
32 | vll visit,dist,taken;
| ^~~~~
xorsort.cpp:51:122: error: reference to 'visit' is ambiguous
51 | void bfs(ll s){visit[s] = 1;queue<ll>q;q.push(s);while(!q.empty()){ll u = q.front();ps(u);q.pop();for(auto x:adj[u]){if(!visit[x]){visit[x] = 1;q.push(x);}}}}
| ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:133,
from xorsort.cpp:1:
/usr/include/c++/10/variant:1700:5: note: candidates are: 'template<class _Visitor, class ... _Variants> constexpr decltype(auto) std::visit(_Visitor&&, _Variants&& ...)'
1700 | visit(_Visitor&& __visitor, _Variants&&... __variants)
| ^~~~~
xorsort.cpp:32:5: note: 'std::vector<long long int> visit'
32 | vll visit,dist,taken;
| ^~~~~
xorsort.cpp:51:132: error: reference to 'visit' is ambiguous
51 | void bfs(ll s){visit[s] = 1;queue<ll>q;q.push(s);while(!q.empty()){ll u = q.front();ps(u);q.pop();for(auto x:adj[u]){if(!visit[x]){visit[x] = 1;q.push(x);}}}}
| ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:133,
from xorsort.cpp:1:
/usr/include/c++/10/variant:1700:5: note: candidates are: 'template<class _Visitor, class ... _Variants> constexpr decltype(auto) std::visit(_Visitor&&, _Variants&& ...)'
1700 | visit(_Visitor&& __visitor, _Variants&&... __variants)
| ^~~~~
xorsort.cpp:32:5: note: 'std::vector<long long int> visit'
32 | vll visit,dist,taken;
| ^~~~~
xorsort.cpp: In function 'void filesin()':
xorsort.cpp:65:27: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
65 | void filesin(void){freopen("amusing.in","r",stdin);}
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
xorsort.cpp: In function 'void filesout()':
xorsort.cpp:66:28: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
66 | void filesout(void){freopen("amusing.out","w",stdout);}
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~