#include using namespace std; using ll=long long; using P=pair; const int MOD=1e9+7; const int INF=1<<30; const int MAX=1e5; template inline void xmin(T &a, T b){a=(a inline void xmax(T &a, T b){a=(a>b)?a:b;} int n; int m,k; int a[11][11]; int dp[11][501]; void solve(){ cin>>n>>m>>k; for(int i=0; i>a[i][j]; } } for(int i=0; i