hiho week 117 register

Ended

Participants:659

Verdict:Accepted
Score:100 / 100
Submitted:2016-10-01 13:30:20

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 <cstdio>  
    #include <cstdlib>  
    #include <cstring>  
    #include <algorithm>  
    #define MAX 205  
    #define MAXCF 101  
    #define min(a,b) (a)>(b)?(b):(a)  
    using namespace std;  
      
    int cf[MAX][MAX];//  
    int queue[MAX];//  
    int path[MAX];//  
    int capacity[MAX];//  
    bool visited[MAX];//访  
      
    int findAugmentPath(int T)  
    {  
        int i = 0, tail = 0;  
        memset(visited, 0, sizeof(visited));  
      
        queue[tail] = 1;//  
        capacity[1] = MAXCF;  
        visited[1] = true;  
        while (i <= tail)  
        {  
            int u = queue[i];  
            if (u == T)  
                return capacity[T];//广  
            for (int v = 2; v <= T; v++)  
            {  
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX