#include using namespace std; #define lli long long int #define REP(i,s,n) for(int i=s;i>n>>m>>k; lli data[12][12]; REP(i,0,n)REP(j,0,m)cin>>data[i][j]; unordered_set s; REP(i,0,m)s.insert(data[0][i]); REP(i,1,n){ unordered_set next; for(auto e:s){ REP(j,0,m){ if(e+data[i][j]<=k){ if(DEBUG)cout<<"nextPush ="<