#include #include using namespace std; const int MAXV = 200; const int REMOVED = 2; char adj[MAXV][MAXV]; string names[MAXV]; int nv; int nRem; int getVnum(string s) { for(int i=0; i 0 && names[index[j-1]] > names[i]) { index[j] = index[j-1]; j--; } index[j] = i; } } int main() { int n, icase=0; int path[MAXV]; int index[MAXV]; cin >> n; while (n > 0) { icase++; for(int i=0; i> s1 >> s2; int v1 = getVnum(s1); int v2 = getVnum(s2); adj[v1][v2] = 1; } nRem = 0; for(int i=0; i> n; } }