#include #include using namespace std; using namespace atcoder; using ll=long long; int main() { int n,m,k; cin>>n>>m>>k; vector x(k); for(int i=0;i>x[i],x[i]--; vector> graph(n,vector(n)); for(int i=0;i>u>>v; u--;v--; graph[u][v]=1; graph[v][u]=1; } vector>> dp(n,vector>(1<(n,-1))),mem(n,vector>(n,vector(n))); auto rec=[&](auto rec,int v,int u,int s)->void{ if(dp[v][s][u]!=-1)return; else dp[v][s][u]=0; int cnt=0; for(int i=0;i>i&1)cnt++; mem[v][u][cnt-1]=1; for(int i=0;i>i&1)==0){ rec(rec,v,i,s|(1<