hiho week 118 register

Ended

Participants:1068

Verdict:Accepted
Score:100 / 100
Submitted:2016-10-05 14:43:36

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<math.h>
#include<iostream>
#include<cstdio>
#include<string>
#include<vector>
#include<queue>
#include<map>
#include <climits>
using namespace std;
#define INF INT_MAX
#define MAX_N 1005 
int maxFlow;
int delta;
int q[MAX_N];
int path[MAX_N];
int capacity[MAX_N];
bool visited[MAX_N];
int cf[MAX_N][MAX_N];
int S, T;
int N, M;
int A, B;
void modifyGraph() {
    int flow = capacity[T];
    int now = T;
    int fa;
    while ( now != S ) {
        fa = path[ now ];
        cf[fa][now] = cf[fa][now] - flow;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX