hiho week 49 register

Ended

Participants:509

Verdict:Accepted
Score:100 / 100
Submitted:2015-06-08 09:39:59

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<algorithm>
#include<cstring>
#include<vector>
#include<iostream>
using namespace std;
const int maxn = 1e4 + 10;
int vis[maxn];
int du[maxn],jdu;
int n,m,cnt;
vector<int> g[maxn];
void dfs(int s)
{
    for(int j = 0; j < g[s].size(); j++)
    {
        if(!vis[g[s][j]])
        {
            vis[g[s][j]] = 1;
            dfs(g[s][j]);
           // printf("%d ",g[s][j]);
        }
    }
}
int main()
{
    //freopen("in.txt","r",stdin);
    scanf("%d%d",&n,&m);
        int from,to;
        for(int i = 0; i < m; ++i)
        {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX