adventure.cpp:19:31: error: reference to 'data' is ambiguous
19 | bool operator()(const data&a, const data&b){
| ^~~~
In file included from /usr/include/c++/11/string:54,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/istream:38,
from /usr/include/c++/11/sstream:38,
from /usr/include/c++/11/complex:45,
from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from adventure.cpp:1:
/usr/include/c++/11/bits/range_access.h:319:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)'
319 | data(initializer_list<_Tp> __il) noexcept
| ^~~~
/usr/include/c++/11/bits/range_access.h:310:5: note: 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
310 | data(_Tp (&__array)[_Nm]) noexcept
| ^~~~
/usr/include/c++/11/bits/range_access.h:300:5: note: 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
300 | data(const _Container& __cont) noexcept(noexcept(__cont.data()))
| ^~~~
/usr/include/c++/11/bits/range_access.h:290:5: note: 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
290 | data(_Container& __cont) noexcept(noexcept(__cont.data()))
| ^~~~
adventure.cpp:9:8: note: 'struct data'
9 | struct data{
| ^~~~
adventure.cpp:19:45: error: reference to 'data' is ambiguous
19 | bool operator()(const data&a, const data&b){
| ^~~~
In file included from /usr/include/c++/11/string:54,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/istream:38,
from /usr/include/c++/11/sstream:38,
from /usr/include/c++/11/complex:45,
from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from adventure.cpp:1:
/usr/include/c++/11/bits/range_access.h:319:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)'
319 | data(initializer_list<_Tp> __il) noexcept
| ^~~~
/usr/include/c++/11/bits/range_access.h:310:5: note: 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
310 | data(_Tp (&__array)[_Nm]) noexcept
| ^~~~
/usr/include/c++/11/bits/range_access.h:300:5: note: 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
300 | data(const _Container& __cont) noexcept(noexcept(__cont.data()))
| ^~~~
/usr/include/c++/11/bits/range_access.h:290:5: note: 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
290 | data(_Container& __cont) noexcept(noexcept(__cont.data()))
| ^~~~
adventure.cpp:9:8: note: 'struct data'
9 | struct data{
| ^~~~
adventure.cpp: In member function 'bool com::operator()(const int&, const int&)':
adventure.cpp:20:26: error: request for member 'dist' in 'a', which is of non-class type 'const int'
20 | return a.dist>b.dist;
| ^~~~
adventure.cpp:20:33: error: request for member 'dist' in 'b', which is of non-class type 'const int'
20 | return a.dist>b.dist;
| ^~~~
adventure.cpp: At global scope:
adventure.cpp:23:29: error: template argument 1 is invalid
23 | priority_queue<data,vec<data>,com>pq; // Djikstra algorithm
| ^
adventure.cpp:23:29: error: template argument 2 is invalid
adventure.cpp:23:34: error: template argument 1 is invalid
23 | priority_queue<data,vec<data>,com>pq; // Djikstra algorithm
| ^
adventure.cpp:23:34: error: template argument 2 is invalid
adventure.cpp: In function 'int main()':
adventure.cpp:30:12: error: request for member 'push' in 'pq', which is of non-class type 'int'
30 | pq.push({1,1,0});
| ^~~~
adventure.cpp:31:19: error: request for member 'empty' in 'pq', which is of non-class type 'int'
31 | while(!pq.empty()){
| ^~~~~
adventure.cpp:32:17: error: reference to 'data' is ambiguous
32 | data cur=pq.top();pq.pop();
| ^~~~
In file included from /usr/include/c++/11/string:54,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/istream:38,
from /usr/include/c++/11/sstream:38,
from /usr/include/c++/11/complex:45,
from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from adventure.cpp:1:
/usr/include/c++/11/bits/range_access.h:319:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)'
319 | data(initializer_list<_Tp> __il) noexcept
| ^~~~
/usr/include/c++/11/bits/range_access.h:310:5: note: 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
310 | data(_Tp (&__array)[_Nm]) noexcept
| ^~~~
/usr/include/c++/11/bits/range_access.h:300:5: note: 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
300 | data(const _Container& __cont) noexcept(noexcept(__cont.data()))
| ^~~~
/usr/include/c++/11/bits/range_access.h:290:5: note: 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
290 | data(_Container& __cont) noexcept(noexcept(__cont.data()))
| ^~~~
adventure.cpp:9:8: note: 'struct data'
9 | struct data{
| ^~~~
adventure.cpp:32:38: error: request for member 'pop' in 'pq', which is of non-class type 'int'
32 | data cur=pq.top();pq.pop();
| ^~~
adventure.cpp:33:22: error: 'cur' was not declared in this scope
33 | ll x=cur.x,y=cur.y,dist=cur.dist,offset; // Offset jika g[i][j]=='N'
| ^~~
adventure.cpp:34:25: error: 'y' was not declared in this scope
34 | if(d[x][y]<=dist)continue;d[x][y]=dist;
| ^
adventure.cpp:34:29: error: 'dist' was not declared in this scope
34 | if(d[x][y]<=dist)continue;d[x][y]=dist;
| ^~~~
adventure.cpp:34:48: error: 'y' was not declared in this scope
34 | if(d[x][y]<=dist)continue;d[x][y]=dist;
| ^
adventure.cpp:34:51: error: 'dist' was not declared in this scope
34 | if(d[x][y]<=dist)continue;d[x][y]=dist;
| ^~~~
adventure.cpp:36:29: error: 'offset' was not declared in this scope; did you mean 'off_t'?
36 | if(dir=='N')offset=0;
| ^~~~~~
| off_t
adventure.cpp:37:34: error: 'offset' was not declared in this scope; did you mean 'off_t'?
37 | else if(dir=='E')offset=1;
| ^~~~~~
| off_t
adventure.cpp:38:34: error: 'offset' was not declared in this scope; did you mean 'off_t'?
38 | else if(dir=='S')offset=2;
| ^~~~~~
| off_t
adventure.cpp:39:33: error: 'offset' was not declared in this scope; did you mean 'off_t'?
39 | else if(dir='W')offset=3;
| ^~~~~~
| off_t
adventure.cpp:40:26: error: 'offset' was not declared in this scope; did you mean 'off_t'?
40 | for(ll i=offset;i<offset+4;i++){
| ^~~~~~
| off_t
adventure.cpp:43:55: error: request for member 'push' in 'pq', which is of non-class type 'int'
43 | if(d[xx][yy]>dist+i-offset)pq.push({xx,yy,dist+i-offset});
| ^~~~