MSBOP 2015 Round3 register

Ended

Participants:978

Verdict:AC | TLE
Submitted:2015-05-09 15:45:48

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 <cstring>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <vector>
#include <queue>
#include <map>
#include <stack>
#include <set>
#include <algorithm>
#include <functional>
using namespace std;
#define N 1000005
vector<int>gra[N];
int ans,w[N];
int x;
void dfs(int u,int f){
    for(int i=0;i<gra[u].size();i++){
        int v=gra[u][i];
        if(v!=f){
           if(w[v]!=0)w[v]--,w[u]++;
           dfs(v,u);
        }
    }
}
int main()
{
    int t,cs,a,b,n,i;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX