lightningrod.cpp: In function 'int main()':
lightningrod.cpp:13:73: error: invalid use of non-static member function 'void std::stack<_Tp, _Sequence>::pop() [with _Tp = std::pair<int, int>; _Sequence = std::deque<std::pair<int, int>, std::allocator<std::pair<int, int> > >]'
13 | while(!st.empty() and x-st.top().first <= y-st.top().second) st.pop;
| ~~~^~~
In file included from /usr/include/c++/10/stack:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:89,
from lightningrod.cpp:1:
/usr/include/c++/10/bits/stl_stack.h:272:7: note: declared here
272 | pop()
| ^~~
lightningrod.cpp:14:90: error: invalid use of member function 'std::stack<_Tp, _Sequence>::const_reference std::stack<_Tp, _Sequence>::top() const [with _Tp = std::pair<int, int>; _Sequence = std::deque<std::pair<int, int>, std::allocator<std::pair<int, int> > >; std::stack<_Tp, _Sequence>::const_reference = const std::pair<int, int>&]' (did you forget the '()' ?)
14 | if(st.empty() or (x-st.top().first > y-st.top().second and x-st.top().first > st.top.second-y)) st.push({x, y});
| ~~~^~~
| ()
lightningrod.cpp:14:94: error: expected ')' before 'second'
14 | if(st.empty() or (x-st.top().first > y-st.top().second and x-st.top().first > st.top.second-y)) st.push({x, y});
| ~ ^~~~~~
| )