skyscraper.cpp: In function 'int main()':
skyscraper.cpp:25:29: error: 'i' was not declared in this scope
25 | for(int j=b[i];j<n;j+=p[i]){
| ^
skyscraper.cpp:27:42: error: 'to' was not declared in this scope; did you mean 'tm'?
27 | if(weight+w<dist[to]){
| ^~
| tm
skyscraper.cpp:29:40: error: no matching function for call to 'std::priority_queue<std::pair<long long int, long long int> >::push(<brace-enclosed initializer list>)'
29 | pq.push({-(dist[to]),to});
| ~~~~~~~^~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/13/queue:66,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:157,
from skyscraper.cpp:1:
/usr/include/c++/13/bits/stl_queue.h:738:7: note: candidate: 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = std::pair<long long int, long long int>; _Sequence = std::vector<std::pair<long long int, long long int> >; _Compare = std::less<std::pair<long long int, long long int> >; value_type = std::pair<long long int, long long int>]'
738 | push(const value_type& __x)
| ^~~~
/usr/include/c++/13/bits/stl_queue.h:738:30: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::priority_queue<std::pair<long long int, long long int> >::value_type&' {aka 'const std::pair<long long int, long long int>&'}
738 | push(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_queue.h:746:7: note: candidate: 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(value_type&&) [with _Tp = std::pair<long long int, long long int>; _Sequence = std::vector<std::pair<long long int, long long int> >; _Compare = std::less<std::pair<long long int, long long int> >; value_type = std::pair<long long int, long long int>]'
746 | push(value_type&& __x)
| ^~~~
/usr/include/c++/13/bits/stl_queue.h:746:25: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::priority_queue<std::pair<long long int, long long int> >::value_type&&' {aka 'std::pair<long long int, long long int>&&'}
746 | push(value_type&& __x)
| ~~~~~~~~~~~~~^~~
skyscraper.cpp:32:29: error: 'i' was not declared in this scope
32 | for(int j=b[i]-p[i];j>=0;j-=p[i]){
| ^
skyscraper.cpp:34:42: error: 'to' was not declared in this scope; did you mean 'tm'?
34 | if(weight+w<dist[to]){
| ^~
| tm
skyscraper.cpp:36:40: error: no matching function for call to 'std::priority_queue<std::pair<long long int, long long int> >::push(<brace-enclosed initializer list>)'
36 | pq.push({-(dist[to]),to});
| ~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_queue.h:738:7: note: candidate: 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = std::pair<long long int, long long int>; _Sequence = std::vector<std::pair<long long int, long long int> >; _Compare = std::less<std::pair<long long int, long long int> >; value_type = std::pair<long long int, long long int>]'
738 | push(const value_type& __x)
| ^~~~
/usr/include/c++/13/bits/stl_queue.h:738:30: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::priority_queue<std::pair<long long int, long long int> >::value_type&' {aka 'const std::pair<long long int, long long int>&'}
738 | push(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_queue.h:746:7: note: candidate: 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(value_type&&) [with _Tp = std::pair<long long int, long long int>; _Sequence = std::vector<std::pair<long long int, long long int> >; _Compare = std::less<std::pair<long long int, long long int> >; value_type = std::pair<long long int, long long int>]'
746 | push(value_type&& __x)
| ^~~~
/usr/include/c++/13/bits/stl_queue.h:746:25: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::priority_queue<std::pair<long long int, long long int> >::value_type&&' {aka 'std::pair<long long int, long long int>&&'}
746 | push(value_type&& __x)
| ~~~~~~~~~~~~~^~~