#include using namespace std; typedef long long ll; int main(){ ll n,m; cin>>n>>m; vector> d(n,vector(m)); for(int i=0;i>d[i][j]; } sort(d[i].begin(),d[i].end()); } ll ans=1e18; for(int i=0;i