1 #include <bits/stdc++.h> 2 #define _for(i,a,b) for(int i = (a);i < (b);i ++) 3 using namespace std; 4 5 const char a[27] = {'A','B','C','D','E','F','G','H','I','J', 6 'K','L','M','N','O','P','Q','R','S','T', 7 'U','V','W','X','Y','Z' 8 }; 9 char s[393] {0}; 10 int m[27][27] {0}; 11 char rnts[39] {0}; 12 int rnt = INT_MAX; 13 char ns[39] {0}; 14 int n; 15 16 void addedge(int a,int b) 17 { 18 m[a][b] = m[b][a] = 1; 19 } 20 void read() 21 { 22 _for(i,0,strlen(s)) 23 if(s[i]==':') 24 for(int j = i+1;s[j]!='