hiho week 115 register

Ended

Participants:333

Verdict:Accepted
Score:100 / 100
Submitted:2016-09-10 20:31:29

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 <queue>
#include <string.h>
using namespace std;
const int maxN = 501;
static int edge[maxN][maxN];
bool visited[maxN];
int father[maxN];
int N, M; //,
int ans; //
void Ford_Fulkerson()
{
    while (1)
    {
        //,广
        queue <int> q;
        memset(visited, 0, sizeof(visited));
        memset(father, -1, sizeof(father));
        int now;
        visited[0] = true;
        q.push(0);
        while (!q.empty())//广
        {
            now = q.front();
            q.pop();
            if (now == M - 1) break;
            for (int i = 0; i < M; i++)
            {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX