hiho Week 15 register

Ended

Participants:1653

Verdict:Wrong Answer
Score:90 / 100
Submitted:2014-10-17 13:41:24

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 <stdio.h>
#include <iostream>
#include <string>
#include <malloc.h>
#include <queue>
#include <map>
#include <stdlib.h>
using namespace std;
struct _ask_node
{
    int number;
    _ask_node* next;
};
struct _node
{
    string name;
    int lchild;
    int brother;
    int color;   //0=white,1=gray,2=black
    _ask_node* askno;
}Tree[100005];
int N,M;
int F[100005];
int parent[100005];
int ans[100005][3];
map<string,int> H;
map<string,queue<int> > G;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX