HDU 1272 小希的迷宫
摘要:
这题数据真是恶心,开始敲出来了,一直WA,后来重敲一遍还是WA,最后看小白的代码才知道,还有( 0 0 ) 这种恶心的数据#include<stdio.h>#include<string.h>int set[100005],des[100005],f;int find( int x ){ return set[x] == x ? x : set[x] = find( set[x] );}void merge( int x,int y ){ int a = find( x ),b = find( y ); if( a != b ) set[a] = b; else if( 阅读全文
posted @ 2011-04-29 22:34 LeeBlog 阅读(201) 评论(0) 推荐(0) 编辑