摘要: 小希的迷宫View Code 1 //杭电1272 2 #include <stdio.h> 3 #include <string.h> 4 5 #define N 100005 6 int father[N],leftt[N],rightt[N]; 7 int find(int x) 8 { 9 if(father[x]==-1)10 return x;11 else12 return find(father[x]);13 }14 void unionset(int x,int y)15 {16 father[y]=x;17 }18 int main(... 阅读全文
posted @ 2012-07-16 20:25 zlyblog 阅读(184) 评论(0) 推荐(0)
摘要: 从字符串中找出数字,并排序输出View Code 1 //1106排序 2 #include<stdio.h> 3 #include<stdlib.h> 4 #include<string.h> 5 int cmp(const void *a,const void *b) 6 { 7 return *(int *)a-*(int *)b; 8 } 9 int main()10 {11 int a[1001],i,j,k,l,w;12 char s1[1001],s2[1001];13 while(gets(s1))14 {15 l=strlen... 阅读全文
posted @ 2012-07-16 10:57 zlyblog 阅读(239) 评论(0) 推荐(0)