#include #include #include using namespace std; using namespace atcoder; using mint = modint998244353; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf32 1000000005 #define Inf64 4000000000000000001LL int main(){ int n,m,k; cin>>n>>m>>k; vector a(k); rep(i,k){ cin>>a[i]; a[i]--; } vector t(n,vector(n)); rep(i,n){ rep(j,n)cin>>t[i][j]; } vector dp(1<(n,Inf32)); rep(i,n){ dp[1<>l)&1)continue; dp[i|(1<