treasure.cpp: In function 'long unsigned int Hash_Key(const int*)':
treasure.cpp:27:3: warning: value computed is not used [-Wunused-value]
27 | *str++;
| ^~~~~~
treasure.cpp: In function 'int askit(int, int, int, int)':
treasure.cpp:96:15: error: invalid conversion from 'int' to 'int*' [-fpermissive]
96 | add(input, DATA);
| ^~~~
| |
| int
treasure.cpp:52:30: note: initializing argument 2 of 'int add(const int*, int*)'
52 | int add(const int *key, int *data)
| ~~~~~^~~~
treasure.cpp:97:13: error: no match for 'operator[]' (operand types are 'std::map<std::tuple<int, int, int, int>, int>' and 'int')
97 | return dp[DATA].data = countTreasure(r1, c1, r2, c2);
| ^
In file included from /usr/include/c++/9/map:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:81,
from treasure.cpp:2:
/usr/include/c++/9/bits/stl_map.h:490:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::tuple<int, int, int, int>; _Tp = int; _Compare = std::less<std::tuple<int, int, int, int> >; _Alloc = std::allocator<std::pair<const std::tuple<int, int, int, int>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::tuple<int, int, int, int>]'
490 | operator[](const key_type& __k)
| ^~~~~~~~
/usr/include/c++/9/bits/stl_map.h:490:34: note: no known conversion for argument 1 from 'int' to 'const key_type&' {aka 'const std::tuple<int, int, int, int>&'}
490 | operator[](const key_type& __k)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/9/bits/stl_map.h:510:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](std::map<_Key, _Tp, _Compare, _Alloc>::key_type&&) [with _Key = std::tuple<int, int, int, int>; _Tp = int; _Compare = std::less<std::tuple<int, int, int, int> >; _Alloc = std::allocator<std::pair<const std::tuple<int, int, int, int>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::tuple<int, int, int, int>]'
510 | operator[](key_type&& __k)
| ^~~~~~~~
/usr/include/c++/9/bits/stl_map.h:510:29: note: no known conversion for argument 1 from 'int' to 'std::map<std::tuple<int, int, int, int>, int>::key_type&&' {aka 'std::tuple<int, int, int, int>&&'}
510 | operator[](key_type&& __k)
| ~~~~~~~~~~~^~~
treasure.cpp: In function 'void findTreasure(int)':
treasure.cpp:244:2: error: expected '}' at end of input
244 | }
| ^
treasure.cpp:156:26: note: to match this '{'
156 | void findTreasure(int N) {
| ^