hiho week 47 register

Ended

Participants:466

Verdict:Accepted
Score:100 / 100
Submitted:2015-05-24 15:14:08

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 <iostream>
using namespace std;
struct SimQueue{
    int tail = -1; 
    int length = 0;
    int size = 0;
    int * buf = NULL;
};
int main()
{
    int num_case = 0;
    cin >> num_case;
    while (num_case > 0)
    {
        int num_node = 0;
        int num_edge = 0;
        cin >> num_node >> num_edge;
        // init adjacency list
        /* 
        Node number begins with 1.
        */
        int * head = new int[num_node + 1]();
        int * next = new int[num_edge + 1 ]();
        int * adj = new int[num_edge + 1]();
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX