hiho week 116 register

Ended

Participants:819

Verdict:Accepted
Score:100 / 100
Submitted:2016-09-18 12:40:38

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<cstdio>
#include<cstring>
#include<queue>
#include<algorithm>
#include<vector>
using namespace std;
const int N = 505;
const int M = 20005;
const int INF = 0x3f3f3f3f;
int head[N];
int to[2 * M];
int nxt[2 * M];
int flow[2 * M];
int path[N];
int predge[N];
bool vis[N];
int cnt = 0;
int n, m;
int s, t;
vector<int> vec;
void input(){
    memset(head, -1, sizeof(head));
    scanf("%d%d", &n, &m);
    s = 1;
    t = n;
    int a, b, c;
    for(int i = 1; i <= m; i++){
        scanf("%d%d%d", &a, &b, &c);
        to[cnt] = b;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX