fancyfence.cpp: In function 'void solve()':
fancyfence.cpp:40:18: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
40 | auto [H, W] = s.top(); s.pop();
| ^
fancyfence.cpp:43:22: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
43 | auto [HH, WW] = s.top(); s.pop();
| ^
fancyfence.cpp:55:18: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
55 | auto [HH, WW] = s.top(); s.pop();
| ^
fancyfence.cpp:62:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
62 | auto [H, W] = s.top(); s.pop();
| ^
fancyfence.cpp:64:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
64 | auto [HH, WW] = s.top(); s.pop();
| ^
fancyfence.cpp:65:31: error: too few arguments to function 'long long int add(long long int, long long int)'
65 | s.push({HH, add(WW + W)});
| ^
fancyfence.cpp:21:4: note: declared here
21 | ll add(ll a, ll b) {return ((((a%M)+(b%M))%M)+M)%M;}
| ^~~
fancyfence.cpp:65:33: error: no matching function for call to 'std::stack<std::pair<int, int> >::push(<brace-enclosed initializer list>)'
65 | s.push({HH, add(WW + W)});
| ^
In file included from /usr/include/c++/10/stack:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:89,
from fancyfence.cpp:1:
/usr/include/c++/10/bits/stl_stack.h:239:7: note: candidate: 'void std::stack<_Tp, _Sequence>::push(const value_type&) [with _Tp = std::pair<int, int>; _Sequence = std::deque<std::pair<int, int>, std::allocator<std::pair<int, int> > >; std::stack<_Tp, _Sequence>::value_type = std::pair<int, int>]'
239 | push(const value_type& __x)
| ^~~~
/usr/include/c++/10/bits/stl_stack.h:239:30: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type&' {aka 'const std::pair<int, int>&'}
239 | push(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_stack.h:244:7: note: candidate: 'void std::stack<_Tp, _Sequence>::push(std::stack<_Tp, _Sequence>::value_type&&) [with _Tp = std::pair<int, int>; _Sequence = std::deque<std::pair<int, int>, std::allocator<std::pair<int, int> > >; std::stack<_Tp, _Sequence>::value_type = std::pair<int, int>]'
244 | push(value_type&& __x)
| ^~~~
/usr/include/c++/10/bits/stl_stack.h:244:25: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::stack<std::pair<int, int> >::value_type&&' {aka 'std::pair<int, int>&&'}
244 | push(value_type&& __x)
| ~~~~~~~~~~~~~^~~