# BZOJ 1083 [SCOI2005]繁忙的都市

## 1083: [SCOI2005]繁忙的都市

Time Limit: 10 Sec  Memory Limit: 162 MB
Submit: 1664  Solved: 1080
[Submit][Status][Discuss]

4 5
1 2 3
1 4 5
2 4 7
2 3 6
3 4 8

3 6

## Source

 1 #include<iostream>
2 #include<cstdio>
3 #include<cmath>
4 #include<algorithm>
5 #include<stack>
6 #include<queue>
7 #include<cstring>
8 #define PAU putchar(' ')
9 #define ENT putchar('\n')
10 #define MSE(a,b) memset(a,b,sizeof(a))
11 #define REN(x) for(ted*e=fch[x];e;e=e->nxt)
12 #define TIL(x) for(int i=1;i<=x;i++)
13 #define ALL(x) for(int j=1;j<=x;j++)
14 using namespace std;
15 const int maxn=300+10,maxm=45000+10,inf=-1u>>1;
16 struct edge{int x,y,w;}e[maxm];bool operator<(const edge&a,const edge&b){return a.w<b.w;}
17 int n,m,fa[maxn];
18 int findset(int x){return x==fa[x]?x:fa[x]=findset(fa[x]);}
19 inline int read(){
20     int x=0;bool sig=true;char ch=getchar();
21     for(;!isdigit(ch);ch=getchar())if(ch=='-')sig=false;
22     for(;isdigit(ch);ch=getchar())x=10*x+ch-'0';return sig?x:-x;
23 }
24 inline void write(int x){
25     if(x==0){putchar('0');return;}if(x<0)putchar('-'),x=-x;
26     int len=0;static int buf[20];while(x)buf[len++]=x%10,x/=10;
27     for(int i=len-1;i>=0;i--)putchar(buf[i]+'0');return;
28 }
29 int main(){
36 }