hiho Week 12 register

Ended

Participants:337

Verdict:Accepted
Score:100 / 100
Submitted:2014-09-22 15:53:42

Lang:GCC

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 <string.h>
#define MAXL 204
//#define LL 201
#define LL 102
int to[MAXL],next[MAXL],last[MAXL];
int cnt;
int used[LL],value[LL];
int dp[LL][LL];
int n,m;
void init()
{
    memset(to,0,sizeof(to));
    memset(next,0,sizeof(next));
    memset(last,0,sizeof(last));
    memset(used,0,sizeof(used));
    memset(value,0,sizeof(value));
    return ;
}
void add_node(int x,int y)
{
    to[cnt]=y;
    next[cnt]=last[x];
    last[x]=cnt;
    cnt++;
    return;
}
void  find_max(int x)
{
    int i;
    used[x]=1;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX