#include #include #include #include #define repi(i,a,b) for(int i=(a);i<(b);++i) #define rep(i,a) repi(i,0,a) #define repd(i,a) for(int i=(a);i>0;--i) #define clr(a,v) memset((a),(v),sizeof(a)) typedef long long ll; const int MAX_N = 60, MAX_K = 15, INF = 1<<29; int N, M, K; int mat[MAX_N][MAX_N]; int dp[1<<(MAX_K+1)][MAX_K]; int main() { scanf( "%d%d%d", &N, &M, &K ); rep( i, N ) rep( j, N ) mat[i][j] = i==j?0:INF; rep( i, M ) { int U, V; scanf( "%d%d", &U, &V ); --U; --V; mat[U][V] = mat[V][U] = 1; } rep( k, N ) rep( i, N ) rep( j, N ) mat[i][j] = std::min( mat[i][j], mat[i][k]+mat[k][j] ); std::vector v; v.push_back(0); ll ans = 0; repd( i, N-1 ) { if( v.size() >= K+1 ) break; v.push_back(i); clr( dp, 0x3f ); dp[1][0] = 0; repi( S, 1, 1<>i&1) ) rep( j, v.size() ) if( i != j && S>>j&1 ) dp[S|1<