hiho week 14 register

Ended

Participants:423

Verdict:Accepted
Score:100 / 100
Submitted:2014-10-04 22:14:10

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<vector>
#include<string>
using namespace std;
class wujiandao {
public:
    void main();
private:
    vector<int> group_hei;
    vector<string> name_hei;
    vector<int> ans;
    int check(string name);
    void opera_zero(string name_a, string name_b);
    void opera_one(string name_a, string name_b);
    int find_represent(int x);
};
void wujiandao::main() {
    int n;
    cin>>n;
    int op;
    string a, b;
    for(int i = 0; i < n; i++) {
        cin>>op>>a>>b;
        if(op == 0) 
            opera_zero(a, b);
        else 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX