锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久偷看各类wc女厕嘘嘘,性欧美丰满熟妇XXXX性久久久,久久精品国产亚洲av日韩http://www.shnenglu.com/vontroy/archive/2010/07/29/121521.htmlVontroyVontroyWed, 28 Jul 2010 23:09:00 GMThttp://www.shnenglu.com/vontroy/archive/2010/07/29/121521.htmlhttp://www.shnenglu.com/vontroy/comments/121521.htmlhttp://www.shnenglu.com/vontroy/archive/2010/07/29/121521.html#Feedback0http://www.shnenglu.com/vontroy/comments/commentRss/121521.htmlhttp://www.shnenglu.com/vontroy/services/trackbacks/121521.html#include <iostream>
#include <cstdio>
const int maxn = 30000 + 5;
using namespace std;
int father[maxn],rank[maxn];
void init( int n )
{
for ( int i = 0; i < n; i++)
{
father[i] = i;
rank[i] = 1;
}
}
int findSet( int n )
{
if(father[n] != n)
father[n] = findSet(father[n]);
return father[n];
}
void Union( int a, int b )
{
int x = findSet( a );
int y = findSet( b );
if( x == y ) return ;
if( rank[x] >= rank[y] )
{
father[y] = x;
rank[x] += rank[y];
}
else
{
father[x] = y;
rank[y] += rank[x];
}
}
int main()
{
int m, n, count, temp, first;
while( ~scanf("%d%d", &n, &m ) && n )
{
init(n);
while( m-- )
{
scanf("%d%d", &count, &first );
for( int i = 1; i < count ;i ++)
{
scanf("%d", &temp);
Union( first, temp );
}
}
printf("%d\n",rank[findSet(0)]);
}
return 0;
}
]]>- HDU 1198 Farm Irrigationhttp://www.shnenglu.com/vontroy/archive/2010/07/29/121520.htmlVontroyVontroyWed, 28 Jul 2010 23:04:00 GMThttp://www.shnenglu.com/vontroy/archive/2010/07/29/121520.htmlhttp://www.shnenglu.com/vontroy/comments/121520.htmlhttp://www.shnenglu.com/vontroy/archive/2010/07/29/121520.html#Feedback0http://www.shnenglu.com/vontroy/comments/commentRss/121520.htmlhttp://www.shnenglu.com/vontroy/services/trackbacks/121520.html#include<iostream>
using namespace std;
int bin[2500];
int find(int x)
{return x==bin[x]?x:find(bin[x]);}
void merge(int x,int y)
{
x=find(x);
y=find(y);
if(x!=y) bin[x]=y;
}
int main()
{
int a[11] = {9, 3, 12, 6, 5, 10, 11, 13, 14, 7, 15}, m, n, i, j, map[50][50], total;
char c;
while(scanf("%d %d", &m, &n), m != -1 || n != -1){
getchar();
for(i = 0; i < m; ++i){
for(j = 0; j < n; ++j){
scanf("%c", &c);
map[i][j] = c - 65;
}
getchar();
}
for(i = 0; i < m * n; ++i) bin[i] = i;
for(i = 0; i < m; ++i)
for(j = 0; j < n; ++j){
if(i + 1 < m && a[map[i][j]] & 0x04 && a[map[i + 1][j]] & 0x01)
merge(i * n + j, i * n + n + j);
if(j + 1 < n && a[map[i][j]] & 0x02 && a[map[i][j + 1]] & 0x08)
merge(i * n + j, i * n + j + 1);
}
for(total = 0, i = 0; i < m * n; ++i)
if(i == bin[i]) ++total;
printf("%d\n", total);
}
return 0;
}
]]>
天天爽天天爽天天片a久久网|
欧美黑人又粗又大久久久|
精品久久久久久99人妻|
亚洲精品乱码久久久久久蜜桃
|
亚洲午夜久久久|
色婷婷综合久久久中文字幕|
久久99国产精品一区二区|
91久久精品国产成人久久|
亚洲а∨天堂久久精品9966|
久久久久久久亚洲Av无码|
久久99精品久久久久久不卡|
久久久久久国产精品无码下载|
蜜桃麻豆www久久|
久久久久久精品无码人妻|
大蕉久久伊人中文字幕|
久久久SS麻豆欧美国产日韩|
狠狠精品久久久无码中文字幕|
欧美日韩精品久久久久|
久久99精品久久久久久秒播|
久久精品中文騷妇女内射|
一本久久a久久精品综合香蕉
|
伊人久久大香线焦综合四虎|
一本久道久久综合狠狠爱|
久久精品免费大片国产大片|
国产精品久久国产精品99盘|
亚洲伊人久久综合影院|
久久人人爽人爽人人爽av|
亚洲午夜久久久精品影院|
91久久精品91久久性色|
久久精品水蜜桃av综合天堂|
色偷偷偷久久伊人大杳蕉|
亚洲中文久久精品无码|
国产成人无码精品久久久性色|
久久精品国产只有精品66|
九九久久精品国产|
精品久久久久久国产|
国产一级做a爰片久久毛片|
久久99精品国产麻豆宅宅|
国产成人精品免费久久久久|
日韩久久久久久中文人妻|
…久久精品99久久香蕉国产|