answer.code:7:42: error: size of array ‘prefixsum’ is not an integral constant-expression
7 | bool works(int s, int prefixsum[n + 1][m + 1]){
| ~~^~~
answer.code:7:35: error: size of array ‘prefixsum’ is not an integral constant-expression
7 | bool works(int s, int prefixsum[n + 1][m + 1]){
| ~~^~~
answer.code: In function ‘bool works(int, int (*)[1])’:
answer.code:19:23: error: no matching function for call to ‘std::queue<int>::push(std::pair<int, int>)’
19 | q.push(make_pair(i, j));
| ~~~~~~^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/13/queue:66,
from answer.code:2:
/usr/include/c++/13/bits/stl_queue.h:285:7: note: candidate: ‘void std::queue<_Tp, _Sequence>::push(const value_type&) [with _Tp = int; _Sequence = std::deque<int, std::allocator<int> >; value_type = int]’
285 | push(const value_type& __x)
| ^~~~
/usr/include/c++/13/bits/stl_queue.h:285:30: note: no known conversion for argument 1 from ‘std::pair<int, int>’ to ‘const std::queue<int>::value_type&’ {aka ‘const int&’}
285 | push(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_queue.h:290:7: note: candidate: ‘void std::queue<_Tp, _Sequence>::push(value_type&&) [with _Tp = int; _Sequence = std::deque<int, std::allocator<int> >; value_type = int]’
290 | push(value_type&& __x)
| ^~~~
/usr/include/c++/13/bits/stl_queue.h:290:25: note: no known conversion for argument 1 from ‘std::pair<int, int>’ to ‘std::queue<int>::value_type&&’ {aka ‘int&&’}
290 | push(value_type&& __x)
| ~~~~~~~~~~~~~^~~
answer.code: In function ‘int main()’:
answer.code:59:24: error: cannot convert ‘int (*)[(m + 1)]’ to ‘int (*)[1]’
59 | if (works(mid, prefixsum)){
| ^~~~~~~~~
| |
| int (*)[(m + 1)]
answer.code:7:23: note: initializing argument 2 of ‘bool works(int, int (*)[1])’
7 | bool works(int s, int prefixsum[n + 1][m + 1]){
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~
answer.code:66:21: error: cannot convert ‘int (*)[(m + 1)]’ to ‘int (*)[1]’
66 | if (works(left, prefixsum)){
| ^~~~~~~~~
| |
| int (*)[(m + 1)]
answer.code:7:23: note: initializing argument 2 of ‘bool works(int, int (*)[1])’
7 | bool works(int s, int prefixsum[n + 1][m + 1]){
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~