for (int i = 1; i <= n + 1; i++) {
int ty; // Uninitialized variable: ty - when i is equal to n+1
if (i <= n) cin >> ty;
if (ty == 1 || i > n) {
for (auto x : se) for (auto y : se) g[x - 1][y - 1] = 1, g[y - 1][x - 1] = 1;
se.clear();
} else {
string s;
cin >> s;
if (mp.find(s) == mp.end()) {
mp[s];
mp[s] = mp.size();
}
int p = mp[s];
se.insert(p);
}
}
Link issue