skyscraper.cpp: In function 'int main()':
skyscraper.cpp:58:15: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
58 | for (auto [b,p] : doges) psi[b].insert(-p);
| ^
skyscraper.cpp:92:38: error: no match for 'operator[]' (operand types are 'std::vector<bool>' and 'std::pair<int, int>')
92 | for (auto sta : g[i]) tempvis[sta]=0;
| ^
In file included from /usr/include/c++/10/vector:68,
from /usr/include/c++/10/queue:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
from skyscraper.cpp:1:
/usr/include/c++/10/bits/stl_bvector.h:909:7: note: candidate: 'std::vector<bool, _Alloc>::reference std::vector<bool, _Alloc>::operator[](std::vector<bool, _Alloc>::size_type) [with _Alloc = std::allocator<bool>; std::vector<bool, _Alloc>::reference = std::vector<bool>::reference; std::vector<bool, _Alloc>::size_type = long unsigned int]'
909 | operator[](size_type __n)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_bvector.h:909:28: note: no known conversion for argument 1 from 'std::pair<int, int>' to 'std::vector<bool>::size_type' {aka 'long unsigned int'}
909 | operator[](size_type __n)
| ~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_bvector.h:916:7: note: candidate: 'std::vector<bool, _Alloc>::const_reference std::vector<bool, _Alloc>::operator[](std::vector<bool, _Alloc>::size_type) const [with _Alloc = std::allocator<bool>; std::vector<bool, _Alloc>::const_reference = bool; std::vector<bool, _Alloc>::size_type = long unsigned int]'
916 | operator[](size_type __n) const
| ^~~~~~~~
/usr/include/c++/10/bits/stl_bvector.h:916:28: note: no known conversion for argument 1 from 'std::pair<int, int>' to 'std::vector<bool>::size_type' {aka 'long unsigned int'}
916 | operator[](size_type __n) const
| ~~~~~~~~~~^~~
skyscraper.cpp:107:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
107 | auto [d,p]=pq.top(); pq.pop();
| ^
skyscraper.cpp:108:9: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
108 | if (vis[p]) continue; vis[p]=1;
| ^~
skyscraper.cpp:108:31: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
108 | if (vis[p]) continue; vis[p]=1;
| ^~~
skyscraper.cpp:111:19: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
111 | for (auto [it,w] : g[p]) pq.push({w+d,it});
| ^