hiho week 171 register

Ended

Participants:443

Verdict:Accepted
Score:100 / 100
Submitted:2017-10-10 13:30:23

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include<iostream>
#include<map>
#include<string>
#include<cstring>
#include<vector>
#include<algorithm>
#include<set>
#include<unordered_map>
using namespace std;
vector<int> Father;
int FindFather(int input)
{
    if (Father[input] != input) FindFather(Father[input]);
    return input;
}
int main()
{
    int n, p;
    scanf("%d", &n);
    Father.resize(n);
    unordered_map<string, set<int>> maillist;
    string username[10000], mail;
    vector<bool> vec(n, 0);
    for (int i = 0; i < n; i++)
    {
        Father[i] = i;
        cin >> username[i];
        cin >> p;
        for (int j = 0; j < p; j++)
        {
            cin >> mail;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX