hiho week 248 register

Ended

Participants:125

Verdict:Accepted
Score:100 / 100
Submitted:2019-04-02 14:35:35

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<string.h>
#include<math.h>
#include<algorithm>
using namespace std;
const int maxn=105;
const int INF=0x3f3f3f3f;
const int mod=1e9+7;
int n,m,k;
int vis[maxn];
int fa[maxn];
int mcnt[maxn];
int M[maxn][maxn];
int Map[maxn][maxn];
int a[maxn];
void update( int l ){
    int f = fa[l];
    for(int i = 1 ; i <= n ; ++ i ){
        if( Map[l][i] != -1){
            Map[f][i] = Map[i][f] = Map[l][i] - 1;
        }
    }
}
int main(){
    memset(fa,-1,sizeof(fa));
    scanf("%d%d%d",&n,&m,&k);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX