railway_trip.cpp: In function 'void solve()':
railway_trip.cpp:90:39: error: invalid conversion from 'long long int*' to 'std::vector<std::vector<long long int> >::size_type' {aka 'long unsigned int'} [-fpermissive]
90 | ll low=lb(all(v[a[i]+1]),i)-v[a].begin()-1;
| ^
| |
| long long int*
In file included from /usr/include/c++/10/vector:67,
from /usr/include/c++/10/queue:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
from railway_trip.cpp:1:
/usr/include/c++/10/bits/stl_vector.h:1043:28: note: initializing argument 1 of 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = std::vector<long long int>; _Alloc = std::allocator<std::vector<long long int> >; std::vector<_Tp, _Alloc>::reference = std::vector<long long int>&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]'
1043 | operator[](size_type __n) _GLIBCXX_NOEXCEPT
| ~~~~~~~~~~^~~
railway_trip.cpp:92:13: warning: capture of variable 'p' with non-automatic storage duration
92 | p[i][0][0]=v[a[i]+1][low];
| ^
railway_trip.cpp:53:4: note: 'long long int p [3005][20][2]' declared here
53 | ll p[N][20][2];
| ^
railway_trip.cpp:92:14: error: expected ',' before '[' token
92 | p[i][0][0]=v[a[i]+1][low];
| ^
| ,
railway_trip.cpp:92:14: error: expected identifier before '[' token
railway_trip.cpp:92:38: error: expected ']' before ';' token
92 | p[i][0][0]=v[a[i]+1][low];
| ^
| ]
railway_trip.cpp: In lambda function:
railway_trip.cpp:92:38: error: expected '{' before ';' token
railway_trip.cpp: In function 'void solve()':
railway_trip.cpp:93:36: error: no matching function for call to 'lower_bound(std::vector<long long int>::iterator, std::vector<long long int>::iterator)'
93 | ll low2=lb(all(v[a[i]]))
| ^
In file included from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from railway_trip.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:1350:5: note: candidate: 'template<class _ForwardIterator, class _Tp> _ForwardIterator std::lower_bound(_ForwardIterator, _ForwardIterator, const _Tp&)'
1350 | lower_bound(_ForwardIterator __first, _ForwardIterator __last,
| ^~~~~~~~~~~
/usr/include/c++/10/bits/stl_algobase.h:1350:5: note: template argument deduction/substitution failed:
railway_trip.cpp:93:36: note: candidate expects 3 arguments, 2 provided
93 | ll low2=lb(all(v[a[i]]))
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from railway_trip.cpp:1:
/usr/include/c++/10/bits/stl_algo.h:2031:5: note: candidate: 'template<class _FIter, class _Tp, class _Compare> _FIter std::lower_bound(_FIter, _FIter, const _Tp&, _Compare)'
2031 | lower_bound(_ForwardIterator __first, _ForwardIterator __last,
| ^~~~~~~~~~~
/usr/include/c++/10/bits/stl_algo.h:2031:5: note: template argument deduction/substitution failed:
railway_trip.cpp:93:36: note: candidate expects 4 arguments, 2 provided
93 | ll low2=lb(all(v[a[i]]))
| ^
railway_trip.cpp:96:9: error: 'low' was not declared in this scope; did you mean 'pow'?
96 | low++;
| ^~~
| pow
railway_trip.cpp:98:13: warning: capture of variable 'p' with non-automatic storage duration
98 | p[i][0][1]=v[a[i]+1][low];
| ^
railway_trip.cpp:53:4: note: 'long long int p [3005][20][2]' declared here
53 | ll p[N][20][2];
| ^
railway_trip.cpp:98:14: error: expected ',' before '[' token
98 | p[i][0][1]=v[a[i]+1][low];
| ^
| ,
railway_trip.cpp:98:14: error: expected identifier before '[' token
railway_trip.cpp:98:38: error: expected ']' before ';' token
98 | p[i][0][1]=v[a[i]+1][low];
| ^
| ]
railway_trip.cpp: In lambda function:
railway_trip.cpp:98:38: error: expected '{' before ';' token
railway_trip.cpp: At global scope:
railway_trip.cpp:101:2: error: expected declaration before '}' token
101 | }
| ^
railway_trip.cpp:102:5: error: expected unqualified-id before 'for'
102 | for(ll i1=k-1;i1>0;i1--){
| ^~~
railway_trip.cpp:102:19: error: 'i1' does not name a type; did you mean 'y1'?
102 | for(ll i1=k-1;i1>0;i1--){
| ^~
| y1
railway_trip.cpp:102:24: error: 'i1' does not name a type; did you mean 'y1'?
102 | for(ll i1=k-1;i1>0;i1--){
| ^~
| y1
railway_trip.cpp:114:2: error: 'a' does not name a type
114 | a[0]=inf;
| ^
railway_trip.cpp:115:2: error: expected unqualified-id before 'for'
115 | for(i=0;i<q;i++){
| ^~~
railway_trip.cpp:115:10: error: 'i' does not name a type
115 | for(i=0;i<q;i++){
| ^
railway_trip.cpp:115:14: error: 'i' does not name a type
115 | for(i=0;i<q;i++){
| ^
railway_trip.cpp:131:1: error: expected declaration before '}' token
131 | }
| ^
railway_trip.cpp: In function 'void fre(std::string)':
railway_trip.cpp:42:27: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
42 | void fre(string s){freopen((s+".in").c_str(),"r",stdin);freopen((s+".out").c_str(),"w",stdout);}
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
railway_trip.cpp:42:64: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
42 | void fre(string s){freopen((s+".in").c_str(),"r",stdin);freopen((s+".out").c_str(),"w",stdout);}
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~