Joker.cpp:14:12: error: template argument 1 is invalid
vector<data> link[200002];
^
Joker.cpp:14:12: error: template argument 2 is invalid
Joker.cpp: In function 'bool dfs(int, int)':
Joker.cpp:23:26: error: 'begin' was not declared in this scope
for(auto &nxt: link[x]){
^
Joker.cpp:23:26: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:95:0,
from Joker.cpp:1:
/usr/include/c++/7/valarray:1211:5: note: 'std::begin'
begin(const valarray<_Tp>& __va)
^~~~~
/usr/include/c++/7/valarray:1211:5: note: 'std::begin'
Joker.cpp:23:26: error: 'end' was not declared in this scope
for(auto &nxt: link[x]){
^
Joker.cpp:23:26: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:95:0,
from Joker.cpp:1:
/usr/include/c++/7/valarray:1231:5: note: 'std::end'
end(const valarray<_Tp>& __va)
^~~
/usr/include/c++/7/valarray:1231:5: note: 'std::end'
Joker.cpp: In function 'int main()':
Joker.cpp:36:17: error: request for member 'push_back' in 'link[s]', which is of non-class type 'int'
link[s].push_back(data(s, e, i));
^~~~~~~~~
Joker.cpp:36:27: error: reference to 'data' is ambiguous
link[s].push_back(data(s, e, i));
^~~~
Joker.cpp:9:8: note: candidates are: struct data
struct data{
^~~~
In file included from /usr/include/c++/7/string:51:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from Joker.cpp:1:
/usr/include/c++/7/bits/range_access.h:318:5: note: template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)
data(initializer_list<_Tp> __il) noexcept
^~~~
/usr/include/c++/7/bits/range_access.h:309:5: note: template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])
data(_Tp (&__array)[_Nm]) noexcept
^~~~
/usr/include/c++/7/bits/range_access.h:299:5: note: template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)
data(const _Container& __cont) noexcept(noexcept(__cont.data()))
^~~~
/usr/include/c++/7/bits/range_access.h:289:5: note: template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)
data(_Container& __cont) noexcept(noexcept(__cont.data()))
^~~~
Joker.cpp:37:17: error: request for member 'push_back' in 'link[e]', which is of non-class type 'int'
link[e].push_back(data(e, s, i));
^~~~~~~~~
Joker.cpp:37:27: error: reference to 'data' is ambiguous
link[e].push_back(data(e, s, i));
^~~~
Joker.cpp:9:8: note: candidates are: struct data
struct data{
^~~~
In file included from /usr/include/c++/7/string:51:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from Joker.cpp:1:
/usr/include/c++/7/bits/range_access.h:318:5: note: template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)
data(initializer_list<_Tp> __il) noexcept
^~~~
/usr/include/c++/7/bits/range_access.h:309:5: note: template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])
data(_Tp (&__array)[_Nm]) noexcept
^~~~
/usr/include/c++/7/bits/range_access.h:299:5: note: template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)
data(const _Container& __cont) noexcept(noexcept(__cont.data()))
^~~~
/usr/include/c++/7/bits/range_access.h:289:5: note: template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)
data(_Container& __cont) noexcept(noexcept(__cont.data()))
^~~~
Joker.cpp:32:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d %d", &n, &m, &q);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
Joker.cpp:35:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &s, &e);
~~~~~^~~~~~~~~~~~~~~~~
Joker.cpp:41:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &l, &r);
~~~~~^~~~~~~~~~~~~~~~~