overtaking.cpp: In lambda function:
overtaking.cpp:41:369: error: expression cannot be used as a function
41 | #define INIT(L,N0,T0,W0,X0,M0,S0) ([&]{Z=X0;N=N0;Y=M0;F(T i=0;i<N;++i)K[i][0]=T0[i];F(T i=0;i<N;++i)V[i]=W0[i];V[N]=Z;F(T i=0;i<Y;++i)X[i]=S0[i];F(T i=0;i<N;++i)H[0].emplace_back(M(K[i][0],i));sort(H[0].B,H[0].E);F(T i=1;i<Y;++i){F(T x=0;x<N;++x){T j=H[i-1][x].second;K[j][i]=K[j][i-1]+V[j]*(X[i]-X[i-1]);H1[i][x]=std::max(x?H1[i][x-1]:M(0LL,0LL),M(K[j][i],j));T pos=L(H[i-1].B,H[i-1].E,M(K[j][i-1],-1LL))-H[i-1].B-1;if(pos>=0)K[j][i]=std::max(K[j][i],H1[i][pos].first);}F(T j=0;j<N;++j)H[i].emplace_back(M(K[j][i],j));sort(H[i].B,H[i].E);}for(T i=Y-1;~i;--i){F(T j=0;j<N;++j){T pt=GP(K[j][i]-X[i]*Z);if(pt==-1)D[i][j]=K[j][i]+(L-X[i])*Z;else{T last=K[j][i]+(X[pt-1]-X[i])*Z;T pos=L(H[pt-1].B,H[pt-1].E,M(last,-1LL))-H[pt-1].B-1;if(pos>=0)D[i][j]=D[pt][H1[pt][pos].second];else assert(0);}}if(i)F(T j=0;j<N;++j)ADD(K[j][i-1]-X[i-1]*Z+1,K[j][i]-X[i]*Z,i);}})()
| ^
overtaking.cpp:47:5: note: in expansion of macro 'INIT'
47 | INIT(L, N0, T0, W0, X0, M0, S0);
| ^~~~
overtaking.cpp: In lambda function:
overtaking.cpp:38:105: error: inconsistent types 'long long int' and 'int' deduced for lambda return type
38 | #define GP(x) ([&]{auto it=R0.upper_bound({x,J,J});if(it!=R0.begin()){--it;if((*it)[1]>=x)R (*it)[2];}R -1;})()
| ^~
overtaking.cpp:41:583: note: in expansion of macro 'GP'
41 | #define INIT(L,N0,T0,W0,X0,M0,S0) ([&]{Z=X0;N=N0;Y=M0;F(T i=0;i<N;++i)K[i][0]=T0[i];F(T i=0;i<N;++i)V[i]=W0[i];V[N]=Z;F(T i=0;i<Y;++i)X[i]=S0[i];F(T i=0;i<N;++i)H[0].emplace_back(M(K[i][0],i));sort(H[0].B,H[0].E);F(T i=1;i<Y;++i){F(T x=0;x<N;++x){T j=H[i-1][x].second;K[j][i]=K[j][i-1]+V[j]*(X[i]-X[i-1]);H1[i][x]=std::max(x?H1[i][x-1]:M(0LL,0LL),M(K[j][i],j));T pos=L(H[i-1].B,H[i-1].E,M(K[j][i-1],-1LL))-H[i-1].B-1;if(pos>=0)K[j][i]=std::max(K[j][i],H1[i][pos].first);}F(T j=0;j<N;++j)H[i].emplace_back(M(K[j][i],j));sort(H[i].B,H[i].E);}for(T i=Y-1;~i;--i){F(T j=0;j<N;++j){T pt=GP(K[j][i]-X[i]*Z);if(pt==-1)D[i][j]=K[j][i]+(L-X[i])*Z;else{T last=K[j][i]+(X[pt-1]-X[i])*Z;T pos=L(H[pt-1].B,H[pt-1].E,M(last,-1LL))-H[pt-1].B-1;if(pos>=0)D[i][j]=D[pt][H1[pt][pos].second];else assert(0);}}if(i)F(T j=0;j<N;++j)ADD(K[j][i-1]-X[i-1]*Z+1,K[j][i]-X[i]*Z,i);}})()
| ^~
overtaking.cpp:47:5: note: in expansion of macro 'INIT'
47 | INIT(L, N0, T0, W0, X0, M0, S0);
| ^~~~
overtaking.cpp: In lambda function:
overtaking.cpp:41:683: error: expression cannot be used as a function
41 | #define INIT(L,N0,T0,W0,X0,M0,S0) ([&]{Z=X0;N=N0;Y=M0;F(T i=0;i<N;++i)K[i][0]=T0[i];F(T i=0;i<N;++i)V[i]=W0[i];V[N]=Z;F(T i=0;i<Y;++i)X[i]=S0[i];F(T i=0;i<N;++i)H[0].emplace_back(M(K[i][0],i));sort(H[0].B,H[0].E);F(T i=1;i<Y;++i){F(T x=0;x<N;++x){T j=H[i-1][x].second;K[j][i]=K[j][i-1]+V[j]*(X[i]-X[i-1]);H1[i][x]=std::max(x?H1[i][x-1]:M(0LL,0LL),M(K[j][i],j));T pos=L(H[i-1].B,H[i-1].E,M(K[j][i-1],-1LL))-H[i-1].B-1;if(pos>=0)K[j][i]=std::max(K[j][i],H1[i][pos].first);}F(T j=0;j<N;++j)H[i].emplace_back(M(K[j][i],j));sort(H[i].B,H[i].E);}for(T i=Y-1;~i;--i){F(T j=0;j<N;++j){T pt=GP(K[j][i]-X[i]*Z);if(pt==-1)D[i][j]=K[j][i]+(L-X[i])*Z;else{T last=K[j][i]+(X[pt-1]-X[i])*Z;T pos=L(H[pt-1].B,H[pt-1].E,M(last,-1LL))-H[pt-1].B-1;if(pos>=0)D[i][j]=D[pt][H1[pt][pos].second];else assert(0);}}if(i)F(T j=0;j<N;++j)ADD(K[j][i-1]-X[i-1]*Z+1,K[j][i]-X[i]*Z,i);}})()
| ^
overtaking.cpp:47:5: note: in expansion of macro 'INIT'
47 | INIT(L, N0, T0, W0, X0, M0, S0);
| ^~~~
overtaking.cpp: In lambda function:
overtaking.cpp:38:105: error: inconsistent types 'long long int' and 'int' deduced for lambda return type
38 | #define GP(x) ([&]{auto it=R0.upper_bound({x,J,J});if(it!=R0.begin()){--it;if((*it)[1]>=x)R (*it)[2];}R -1;})()
| ^~
overtaking.cpp:43:26: note: in expansion of macro 'GP'
43 | #define ARR(x) ([&]{T pt=GP(x);if(pt==-1)R x+X[Y-1]*Z;T last=x+X[pt-1]*Z;T pos=L(H[pt-1].B,H[pt-1].E,M(last,-1LL))-H[pt-1].B-1;R D[pt][H1[pt][pos].second];})()
| ^~
overtaking.cpp:52:12: note: in expansion of macro 'ARR'
52 | return ARR(cur);
| ^~~