chase.cpp: In function 'void dfs1(int, int)':
chase.cpp:17:12: warning: unused variable 'j' [-Wunused-variable]
int i, j;
^
chase.cpp: In function 'void dfs2(int, int)':
chase.cpp:57:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(j=0; j<V[i].size(); j++)
~^~~~~~~~~~~~
chase.cpp:63:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(j=0; j<V[i-1].size(); j++)
~^~~~~~~~~~~~~~
chase.cpp: In function 'void dfs3(int, int)':
chase.cpp:89:28: error: no matching function for call to 'max(ll&, ll [110])'
ans=max(ans, dp1[K]);
^
In file included from /usr/include/c++/7/bits/char_traits.h:39:0,
from /usr/include/c++/7/ios:40,
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 chase.cpp:1:
/usr/include/c++/7/bits/stl_algobase.h:219:5: note: candidate: template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)
max(const _Tp& __a, const _Tp& __b)
^~~
/usr/include/c++/7/bits/stl_algobase.h:219:5: note: template argument deduction/substitution failed:
chase.cpp:89:28: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'll [110] {aka long long int [110]}')
ans=max(ans, dp1[K]);
^
In file included from /usr/include/c++/7/bits/char_traits.h:39:0,
from /usr/include/c++/7/ios:40,
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 chase.cpp:1:
/usr/include/c++/7/bits/stl_algobase.h:265:5: note: candidate: template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^~~
/usr/include/c++/7/bits/stl_algobase.h:265:5: note: template argument deduction/substitution failed:
chase.cpp:89:28: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'll [110] {aka long long int [110]}')
ans=max(ans, dp1[K]);
^
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from chase.cpp:1:
/usr/include/c++/7/bits/stl_algo.h:3462:5: note: candidate: template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)
max(initializer_list<_Tp> __l)
^~~
/usr/include/c++/7/bits/stl_algo.h:3462:5: note: template argument deduction/substitution failed:
chase.cpp:89:28: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
ans=max(ans, dp1[K]);
^
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from chase.cpp:1:
/usr/include/c++/7/bits/stl_algo.h:3468:5: note: candidate: template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)
max(initializer_list<_Tp> __l, _Compare __comp)
^~~
/usr/include/c++/7/bits/stl_algo.h:3468:5: note: template argument deduction/substitution failed:
chase.cpp:89:28: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
ans=max(ans, dp1[K]);
^
chase.cpp: In function 'int main()':
chase.cpp:115:12: warning: unused variable 'j' [-Wunused-variable]
int i, j, k;
^
chase.cpp:115:15: warning: unused variable 'k' [-Wunused-variable]
int i, j, k;
^
chase.cpp:117:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &N, &K);
~~~~~^~~~~~~~~~~~~~~~
chase.cpp:118:30: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(i=1; i<=N; i++) scanf("%lld", &P[i]);
~~~~~^~~~~~~~~~~~~~~
chase.cpp:122:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &u, &v);
~~~~~^~~~~~~~~~~~~~~~