hiho week 119 register

Ended

Participants:2176

Verdict:Accepted
Score:100 / 100
Submitted:2016-10-08 21:44:06

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<cmath>
#include<cstring>
#include<queue>
using namespace std;
#define MAX_N 505 
#define INF 1<<(30)
int student[MAX_N];
int capacity[MAX_N][MAX_N];
int flow[MAX_N];
int pre[MAX_N];
int used[MAX_N]; 
int BFS(int src ,int des){
    
    memset(pre , -1 , sizeof(pre));
    flow[0]=INF;
    pre[0]=0;
    
    queue<int> q;
    q.push(src);
    
    while(!q.empty()){
        int index = q.front();
        q.pop();
        
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX