hiho week 178 register

Ended

Participants:294

Verdict:Accepted
Score:100 / 100
Submitted:2017-11-27 13:56:52

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 <vector>
#include <stack>
#include <assert.h>
using namespace std;
struct node
{
    bool bstable;
    int nsd;
    int nincnt;
    vector<int>vecin;
    vector<int>vecparent;
    node()
    {
        nincnt = 0;
    }
};
node arrnode[100001];
stack<int>stQ;
int N;
//int _tmain(int argc, _TCHAR* argv[])
int main()
{
    scanf("%d", &N);
    int k, ai;
    for (int i = 1; i <= N; i++)
    {
        scanf("%d", &k);
        arrnode[i].nincnt = k;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX