using System; using System.Collections.Generic; using System.Linq; namespace Yukicoder { class Program { static void Main(string[] args) { var firstLine = Console.ReadLine().Split(' ').Select(int.Parse).ToArray(); var n = firstLine[0]; var m = firstLine[1]; var k = firstLine[2]; int[,] graph = new int[n, n]; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { graph[i, j] = 1000; } } for (int i = 0; i < n; i++) { graph[i, i] = 0; } for (int i = 0; i < m; i++) { var line = Console.ReadLine().Split(' ').Select(int.Parse).ToArray(); graph[line[0]-1, line[1]-1] = 1; graph[line[1]-1, line[0]-1] = 1; } for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { for (int l = 0; l < n; l++) { graph[l, j] = Math.Min(graph[l, j], graph[l, i] + graph[i, j]); } } } List vertexs = new List(); vertexs.Add(0); long score = 0L; int[,] dp = new int[1 << 16, 16]; for (int i = n - 1; i > 0; i--) { if (vertexs.Count >= k + 1) { break; } vertexs.Add(i); for (int j = 0; j < 1 << 16; j++) { for (int l = 0; l < 16; l++) { dp[j, l] = 0x3f; } } dp[1, 0] = 0; int count = vertexs.Count; for (int mask = 1; mask < 1 << count; mask++) { for (int x = 0; x < count; x++) { if ((mask & (1 << x)) == (1<