skyscraper.cpp: In function 'int main()':
skyscraper.cpp:45:26: error: no matching function for call to 'std::vector<int>::push_back(<brace-enclosed initializer list>)'
g[i].push_back({c, x});
^
In file included from /usr/include/c++/7/vector:64:0,
from /usr/include/c++/7/functional:61,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:71,
from skyscraper.cpp:4:
/usr/include/c++/7/bits/stl_vector.h:939:7: note: candidate: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int]
push_back(const value_type& __x)
^~~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:939:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type& {aka const int&}'
/usr/include/c++/7/bits/stl_vector.h:953:7: note: candidate: void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int]
push_back(value_type&& __x)
^~~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:953:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<int>::value_type&& {aka int&&}'
skyscraper.cpp:49:26: error: no matching function for call to 'std::vector<int>::push_back(<brace-enclosed initializer list>)'
g[i].push_back({c, x});
^
In file included from /usr/include/c++/7/vector:64:0,
from /usr/include/c++/7/functional:61,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:71,
from skyscraper.cpp:4:
/usr/include/c++/7/bits/stl_vector.h:939:7: note: candidate: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int]
push_back(const value_type& __x)
^~~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:939:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type& {aka const int&}'
/usr/include/c++/7/bits/stl_vector.h:953:7: note: candidate: void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int]
push_back(value_type&& __x)
^~~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:953:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<int>::value_type&& {aka int&&}'
skyscraper.cpp:62:14: error: request for member 'second' in 'e', which is of non-class type 'int'
if(dist[e.second] > cw + e.first) {
^~~~~~
skyscraper.cpp:62:31: error: request for member 'first' in 'e', which is of non-class type 'int'
if(dist[e.second] > cw + e.first) {
^~~~~
skyscraper.cpp:63:12: error: request for member 'second' in 'e', which is of non-class type 'int'
dist[e.second] = cw + e.first;
^~~~~~
skyscraper.cpp:63:29: error: request for member 'first' in 'e', which is of non-class type 'int'
dist[e.second] = cw + e.first;
^~~~~
skyscraper.cpp:64:20: error: request for member 'first' in 'e', which is of non-class type 'int'
q.push({cw + e.first, e.second});
^~~~~
skyscraper.cpp:64:29: error: request for member 'second' in 'e', which is of non-class type 'int'
q.push({cw + e.first, e.second});
^~~~~~
skyscraper.cpp:64:36: error: no matching function for call to 'std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> > >::push(<brace-enclosed initializer list>)'
q.push({cw + e.first, e.second});
^
In file included from /usr/include/c++/7/queue:64:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:86,
from skyscraper.cpp:4:
/usr/include/c++/7/bits/stl_queue.h:595:7: note: candidate: void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = std::pair<int, int>]
push(const value_type& __x)
^~~~
/usr/include/c++/7/bits/stl_queue.h:595:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type& {aka const std::pair<int, int>&}'
/usr/include/c++/7/bits/stl_queue.h:603:7: note: candidate: void std::priority_queue<_Tp, _Sequence, _Compare>::push(std::priority_queue<_Tp, _Sequence, _Compare>::value_type&&) [with _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = std::pair<int, int>]
push(value_type&& __x)
^~~~
/usr/include/c++/7/bits/stl_queue.h:603:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> > >::value_type&& {aka std::pair<int, int>&&}'
skyscraper.cpp:29:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &n, &m);
~~~~~^~~~~~~~~~~~~~~~~
skyscraper.cpp:31:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
int b, p; scanf("%d %d", &b, &p);
~~~~~^~~~~~~~~~~~~~~~~