skyscraper.cpp:21:1: error: reference to 'data' is ambiguous
21 | data a[30010];
| ^~~~
In file included from /usr/include/c++/9/string:54,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from skyscraper.cpp:1:
/usr/include/c++/9/bits/range_access.h:318:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)'
318 | data(initializer_list<_Tp> __il) noexcept
| ^~~~
/usr/include/c++/9/bits/range_access.h:309:5: note: 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
309 | data(_Tp (&__array)[_Nm]) noexcept
| ^~~~
/usr/include/c++/9/bits/range_access.h:299:5: note: 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
299 | data(const _Container& __cont) noexcept(noexcept(__cont.data()))
| ^~~~
/usr/include/c++/9/bits/range_access.h:289:5: note: 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
289 | data(_Container& __cont) noexcept(noexcept(__cont.data()))
| ^~~~
skyscraper.cpp:20:23: note: 'typedef struct std::pair<int, int> data'
20 | typedef pair<int,int> data;
| ^~~~
skyscraper.cpp:23:32: error: template argument 1 is invalid
23 | priority_queue<data,vector<data>,greater<data> > q;
| ^
skyscraper.cpp:23:32: error: template argument 2 is invalid
skyscraper.cpp:23:46: error: template argument 1 is invalid
23 | priority_queue<data,vector<data>,greater<data> > q;
| ^
skyscraper.cpp:23:48: error: template argument 1 is invalid
23 | priority_queue<data,vector<data>,greater<data> > q;
| ^
skyscraper.cpp:23:48: error: template argument 2 is invalid
skyscraper.cpp:23:48: error: template argument 3 is invalid
skyscraper.cpp: In function 'int main()':
skyscraper.cpp:27:35: error: 'a' was not declared in this scope
27 | for(i=0;i<m;++i)scanf("%d%d",&a[i].f,&a[i].s);
| ^
skyscraper.cpp:28:7: error: 'a' was not declared in this scope
28 | s=a[0].f,e=a[1].f;
| ^
skyscraper.cpp:34:7: error: request for member 'push' in 'q', which is of non-class type 'int'
34 | q.push({0,s});
| ^~~~
skyscraper.cpp:35:14: error: request for member 'empty' in 'q', which is of non-class type 'int'
35 | while(!q.empty()){
| ^~~~~
skyscraper.cpp:36:9: error: reference to 'data' is ambiguous
36 | data p=q.top();
| ^~~~
In file included from /usr/include/c++/9/string:54,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from skyscraper.cpp:1:
/usr/include/c++/9/bits/range_access.h:318:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)'
318 | data(initializer_list<_Tp> __il) noexcept
| ^~~~
/usr/include/c++/9/bits/range_access.h:309:5: note: 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
309 | data(_Tp (&__array)[_Nm]) noexcept
| ^~~~
/usr/include/c++/9/bits/range_access.h:299:5: note: 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
299 | data(const _Container& __cont) noexcept(noexcept(__cont.data()))
| ^~~~
/usr/include/c++/9/bits/range_access.h:289:5: note: 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
289 | data(_Container& __cont) noexcept(noexcept(__cont.data()))
| ^~~~
skyscraper.cpp:20:23: note: 'typedef struct std::pair<int, int> data'
20 | typedef pair<int,int> data;
| ^~~~
skyscraper.cpp:37:11: error: request for member 'pop' in 'q', which is of non-class type 'int'
37 | q.pop();
| ^~~
skyscraper.cpp:38:14: error: 'p' was not declared in this scope
38 | if(D[p.s]!=p.f)continue;
| ^
skyscraper.cpp:39:18: error: 'p' was not declared in this scope
39 | for(i=st[p.s];a[i].f==p.s&&i<m;++i){
| ^
skyscraper.cpp:41:58: error: request for member 'push' in 'q', which is of non-class type 'int'
41 | for(j=p.s+a[i].s;j<n;j+=a[i].s)if(D[j]>++d)q.push({D[j]=d,j});
| ^~~~
skyscraper.cpp:43:59: error: request for member 'push' in 'q', which is of non-class type 'int'
43 | for(j=p.s-a[i].s;j>=0;j-=a[i].s)if(D[j]>++d)q.push({D[j]=d,j});
| ^~~~
skyscraper.cpp: In function 'void usaco(std::string)':
skyscraper.cpp:5:29: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
5 | void usaco(string s){freopen((s+".in").c_str(),"r",stdin);freopen((s+".out").c_str(),"w",stdout);}
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
skyscraper.cpp:5:66: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
5 | void usaco(string s){freopen((s+".in").c_str(),"r",stdin);freopen((s+".out").c_str(),"w",stdout);}
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
skyscraper.cpp: In function 'int main()':
skyscraper.cpp:26:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
26 | scanf("%d%d",&n,&m);
| ~~~~~^~~~~~~~~~~~~~