hdu 1106 排序

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1106比较简单,不过还是出错了、输入一行数字,如果我们把这行数字中的‘5’都看成空格,那么就得到一行用空格分割的若干非负整数(可能有些整数以‘0’开头,这些头部的‘0’应该被忽略掉,除非这个整数就是由若干个‘0’组成的,这时这个整数就是0)。你的任务是:对这些分割得到的整数,依从小到大的顺序排序输出。#include <stdio.h>#include <string.h>#include <stdlib.h>int cmp(const void *a,const void 阅读全文
posted @ 2012-03-31 21:06 江财小子 阅读(135) 评论(0) 推荐(0)

并查集-Is It A Tree?hdu 1325

摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1325http://poj.org/problem?id=1308在POJ上WA了,看来还是有问题的呀#include <iostream>#include <cstdio>#include <string.h>using namespace std;int hr[100003],hs[100003];int mer[100003];int main(){ // freopen("in.txt","r",stdin); int 阅读全文
posted @ 2012-03-31 17:26 江财小子 阅读(352) 评论(0) 推荐(0)