#include using namespace std; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a vector make_v(size_t a){return vector(a);} template auto make_v(size_t a,Ts... ts){ return vector(ts...))>(a,make_v(ts...)); } template typename enable_if::value!=0>::type fill_v(U &u,const V... v){u=U(v...);} template typename enable_if::value==0>::type fill_v(U &u,const V... v){ for(auto &e:u) fill_v(e,v...); } template decltype(auto) zip(vector... args){ vector res; Int n=min({args.size()...}); res.reserve(n); for(Int i=0;i identity(Int n){ vector ord(n); iota(ord.begin(),ord.end(),0); return ord; } //INSERT ABOVE HERE signed main(){ cin.tie(0); ios::sync_with_stdio(0); Int n,m; cin>>n>>m; auto A=make_v(n,m); for(Int i=0;i>A[i][j]; vector sum(m); for(Int i=0;i sc(n,0); for(Int i=0;i(2,m); fill_v(C,0); Int pos=0; for(auto [_, i]:zs){ for(Int j=0;j