摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2220 找规律 1.首先用个bool数组表示u中在v中未出现的数字 2.然后把最小的一个数与V中的n(1--n-2)数结合成一条边 3.如果v中这个不在存在,则存入bool数组中,依次类推 #include using namespace std; int a[110],b[110]; bool c[110];... 阅读全文
posted @ 2008-07-14 21:01 俺是打铁的 阅读(154) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2218 传说中的不变量定理 #include using namespace std; int a[6]; int main() { int temp; int i,n; cin>>n; while (n--) { for(i=0;i<6;i++) ... 阅读全文
posted @ 2008-07-14 19:15 俺是打铁的 阅读(184) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2207 该题目本身比较简单,但无意中发现我们的肥庄的一个比较有创新的方法,拿出来晒晒 #include using namespace std; typedef union { unsigned long IP; unsigned char Sub[4]; }Info; int main() { l... 阅读全文
posted @ 2008-07-14 14:27 俺是打铁的 阅读(285) 评论(0) 推荐(0) 编辑