07 2012 档案

摘要:View Code 1 #include<stdio.h> 2 #include<iostream> 3 using namespace std; 4 int main() 5 { 6 int n; 7 loop: 8 while(scanf("%d",&n)!=-1) 9 {10 int i,j,k;11 for(i=1;i<100;i++)//题目告诉测试实例不超过10000,也就意味着循环不超过10012 {13 for(j=1;j<100;j++)14 ... 阅读全文
posted @ 2012-07-31 20:54 zlyblog 阅读(210) 评论(0) 推荐(0) 编辑
摘要:View Code 1 #include <stdio.h> 2 int main() 3 { 4 int z, p, n; 5 scanf("%d", &z); 6 while (z-- != 0) 7 { 8 scanf("%d", &n); 9 p = 0;10 while (n%2== 0)11 {12 ++p;13 n=n/2;14 }15 printf("%d %d\n", n, p);16 }17... 阅读全文
posted @ 2012-07-31 16:55 zlyblog 阅读(106) 评论(0) 推荐(0) 编辑
摘要:View Code 1 #include<stdio.h> 2 #include<string.h> 3 int a[510],b[510]; 4 int c[130000]; 5 int main() 6 { 7 int n,i,x,j; 8 while(scanf("%d",&n),n!=0) 9 {10 memset(c,0,sizeof(c));11 for(i=0;i<n;i++)12 scanf("%d",&a[i]);13 for(i=0;i<n;i++)14 {15... 阅读全文
posted @ 2012-07-31 14:52 zlyblog 阅读(177) 评论(0) 推荐(0) 编辑
摘要:祖先没赋值,纠结了好久,长个教训View Code 1 #include<stdio.h> 2 #include<math.h> 3 #include<stdlib.h> 4 #include<string.h> 5 int n; 6 7 int set[510]; 8 int f[510],a[510],b[510]; 9 struct PP10 {11 int u,v;12 int pri;13 }d[30003];14 int cmp(const void *a,const void *b)15 {16 struct PP *c,*d;17 阅读全文
posted @ 2012-07-31 11:11 zlyblog 阅读(168) 评论(0) 推荐(0) 编辑
摘要:杭电上为多实例测试,poj上为单实例,在此,列出poj代码View Code 1 #include<stdio.h> 2 #include<string.h> 3 #include<math.h> 4 #define M 200000000 5 #define N 110 6 double map[N][N],a[N],b[N]; 7 int n; 8 void met()//简单的最小生成树算法 9 {10 int i,k;11 double min;12 k=1;13 a[k]=0;14 while(b[k]==0)15 {16 ... 阅读全文
posted @ 2012-07-31 10:23 zlyblog 阅读(269) 评论(0) 推荐(0) 编辑
摘要:View Code 1 #include<stdio.h> 2 #include<string.h> 3 #define M 70000 4 #define N 510 5 int map[N][N],a[N],b[N]; 6 int n; 7 int met() 8 { 9 int i,k,min;10 k=1;11 a[k]=0;12 while(b[k]==0)13 {14 b[k]=1;15 for(i=1;i<=n;i++)16 if(b[i]==0&&a[i]>map[k][i])17... 阅读全文
posted @ 2012-07-31 10:04 zlyblog 阅读(120) 评论(0) 推荐(0) 编辑
摘要:最小生成树方法与最短路径有些相似,多数题又可用并查集求解,但并查集比较耗时,解决某些稍复杂的问题可能超时;View Code 1 //poj2395 2 #include<stdio.h> 3 #include<string.h> 4 #define M 1000000001 5 #define N 2500 6 int map[N][N],a[N],b[N]; 7 int n,m; 8 int met() 9 {10 int i,k,flag,min;11 for(i=1;i<=n;i++)12 {13 a[i]=map[1][i];14 }... 阅读全文
posted @ 2012-07-31 09:42 zlyblog 阅读(178) 评论(0) 推荐(0) 编辑
摘要:杭电1241Sample Input1 1*3 5*@*@***@***@*@*1 8@@****@*5 5****@*@@*@*@**@@@@*@@@**@0 0Sample Output0122View Code 1 //杭电1241 2 3 #include<stdio.h> 4 #include<string.h> 5 #define N 120 6 char map[N][N]; 7 int m,n; 8 int b[8][2]={1,0, -1,0, 0,1, 0,-1, 1,1, -1,1, 1,-1,-1,-1}; 9 10 void bfs(int x 阅读全文
posted @ 2012-07-28 16:02 zlyblog 阅读(106) 评论(0) 推荐(0) 编辑
摘要:杭电1242Sample Input7 8#.#####.#.a#..r.#..#x.....#..#.##...##...#..............Sample Output13View Code 1 //杭电1242 2 #include<stdio.h> 3 #include<queue> 4 using namespace std; 5 #define N 202 6 char map[N][N]; 7 int mark[N][N]; 8 int m,n,x,y,flag; 9 int d[4][2]={1,0,-1,0,0,1,0,-1};10 typed 阅读全文
posted @ 2012-07-28 15:59 zlyblog 阅读(146) 评论(0) 推荐(0) 编辑
摘要:杭电1372Sample Inpute2 e4a1 b2b2 c3a1 h8a1 h7h8 a1b1 c3f6 f6Sample OutputTo get from e2 to e4 takes 2 knight moves.To get from a1 to b2 takes 4 knight moves.To get from b2 to c3 takes 2 knight moves.To get from a1 to h8 takes 6 knight moves.To get from a1 to h7 takes 5 knight moves.To get from h8 to a 阅读全文
posted @ 2012-07-28 15:54 zlyblog 阅读(206) 评论(0) 推荐(0) 编辑
摘要:杭电1042View Code 1 #include<stdio.h> 2 #include<memory.h> 3 int a[10000]; 4 int Mulity(int n) 5 { 6 int carry,i,j,w,g,t; 7 memset(a,0,sizeof(a)); 8 a[0]=1; 9 w=1; //刚开始时只有1位10 for(i=1;i<=n;i++)11 { 12 carry=0;13 t=w;14 //用数字与原有的结果的各位的数字一一相乘,从而分解数字(利于存... 阅读全文
posted @ 2012-07-28 10:50 zlyblog 阅读(216) 评论(0) 推荐(0) 编辑
摘要:杭电1302题意:一个蜗牛在某容器的底部,容器高度为h,蜗牛每次白天行走的距离逐渐减小,减小系数为f;第一天白天爬行的距离为u,以后每次白天爬行的距离都减小原来的u*f/100.0,蜗牛夜间休息会滑落d,最后看看蜗牛是否能爬到顶部;成功失败都输出所需的天数。View Code 1 #include<stdio.h> 2 int main() 3 { 4 float i,h,u,d,f,a,b; 5 int day; 6 scanf("%f%f%f%f",&h,&u,&d,&f); 7 while(h) 8 { 9 day=1;10 阅读全文
posted @ 2012-07-27 19:54 zlyblog 阅读(164) 评论(0) 推荐(0) 编辑
摘要:杭电1248题意:用n元买药水,有150,200,350元的,多余的钱当作小费,最少要给多少小费。Analyse:首先,350块的无敌药水可以忽略,因为它可以被一个血瓶和一个魔瓶代替,只要血瓶和魔瓶就可以组合了。然后,假设有50*n+m(0<m<50)块,其最少要给的小费是50*n要给的小费加上m块。以五十块为单位,向前试:大钞面额 0 50 100 150 200 250 300 350 400 450 500 550 600最少小费 0 50 100 0 0 50 0 0 0 0 0 0 0150*4+200*0=60015... 阅读全文
posted @ 2012-07-27 10:02 zlyblog 阅读(159) 评论(0) 推荐(0) 编辑
摘要:杭电1690不理解View Code 1 #include<stdio.h> 2 #include<iostream> 3 using namespace std; 4 #define maxint 0x7f7f7f7f7f7f7f7fLL 5 typedef __int64 LL; 6 LL mat[105][105]; 7 LL cor[105]; 8 LL l1,l2,l3,l4,c1,c2,c3,c4; 9 int n;10 LL change(LL x)11 {12 if(x<0) x=-x;13 if(x>0&&x<=l1) 阅读全文
posted @ 2012-07-26 17:29 zlyblog 阅读(192) 评论(0) 推荐(0) 编辑
摘要:杭电2680Problem DescriptionOne day , Kiki wants to visit one of her friends. As she is liable to carsickness , she wants to arrive at her friend’s home as soon as possible . Now give you a map of the city’s traffic route, and the stations which are near Kiki’s home so that she can take. You may suppos 阅读全文
posted @ 2012-07-26 15:23 zlyblog 阅读(276) 评论(0) 推荐(0) 编辑
摘要:杭电1596其实本题思路还是运用迪杰斯特拉算法,与前面题有所不同的是本题找最大值,这就要注意,在选取过程中,变量的控制;View Code 1 //杭电1596 2 #include<stdio.h> 3 #include<string.h> 4 #define M 999999999 5 #define N 1010 6 int b[N]; 7 double map[N][N],a[N]; 8 int panduan(double x) 9 {10 return x>0?1:0;//实数与零比较11 }12 13 int main()14 {15 int n,m 阅读全文
posted @ 2012-07-26 10:34 zlyblog 阅读(222) 评论(0) 推荐(0) 编辑
摘要:最短路径求解View Code 1 //杭电1874(最短路径) 2 #include<stdio.h> 3 #define Max 10000 4 int n,m,start,end; 5 int a[210],b[210],map[210][210]; 6 void bfs() 7 { 8 int i,j,k,min; 9 for(i=0;i<n;i++)10 a[i]=map[start][i];11 a[start]=0;12 b[start]=1;13 for(i=0;i<n;i++)14 {15 mi... 阅读全文
posted @ 2012-07-25 16:46 zlyblog 阅读(195) 评论(0) 推荐(0) 编辑
摘要:杭电2112View Code 1 //杭电2112 2 #include<stdio.h> 3 #include<string.h> 4 #include<stdlib.h> 5 #define M 99999999 6 #define N 160 7 char s[N][50]; 8 int a[N],b[N],map[N][N]; 9 int n,t,num,k,p,d;10 int MIN(int a,int b)11 {12 return a<b?a:b;13 }14 int look(char a[])15 {16 int i;17 for 阅读全文
posted @ 2012-07-25 16:45 zlyblog 阅读(174) 评论(0) 推荐(0) 编辑
摘要:杭电1160View Code 1 //杭电1160 2 #include<stdio.h> 3 #include<stdlib.h> 4 #define N 1005 5 int b[N],c[N],d[N][N]; 6 struct mouse 7 { 8 int w,v; 9 int id;10 }a[1001];11 int cmp(const void *a,const void *b)12 {13 struct mouse *x,*y;14 x=(struct mouse *)a;15 y=(struct mouse *)b;16 ... 阅读全文
posted @ 2012-07-24 16:00 zlyblog 阅读(194) 评论(0) 推荐(0) 编辑
摘要:杭电1312View Code 1 //1312红与黑 2 #include<stdio.h> 3 #include<string.h> 4 #include<queue> 5 using namespace std; 6 char a[21][21]; 7 int m,n; 8 int sum; 9 int d[4][2]={1,0,-1,0,0,1,0,-1};10 struct node11 {12 int x,y;13 };14 15 int judge(int x,int y)16 {17 if(x>=0&&x<n&am 阅读全文
posted @ 2012-07-20 11:12 zlyblog 阅读(182) 评论(0) 推荐(0) 编辑
摘要:View Code 1 //zzuli1220 2 #include<stdio.h> 3 #include<queue> 4 using namespace std; 5 int n,k; 6 int f[100001]; 7 bool a[100001]; 8 queue<int>q; 9 void bfs()10 {11 int x;12 a[n]=1;13 q.push(n);14 while(!q.empty())15 {16 x=q.front();17 q.pop();18 if(x==k)... 阅读全文
posted @ 2012-07-19 17:24 zlyblog 阅读(200) 评论(0) 推荐(0) 编辑
摘要:北大2421题意:输入一个数n,代表村庄数,然后输入n行n列的数组,第i行第j列代表第i个村庄与第j个村庄的距离。然后输入一个数m,接下来m行,每行代表某两个村庄之间的路已被修;输出要修的最短距离,保证每两个村庄之间都可以直接或间接的联系。View Code 1 //2421C++ 2 #include<stdio.h> 3 #include<string.h> 4 #include<stdlib.h> 5 6 #define Max 1005 7 int n,a[Max][Max]; 8 int set[Max],f[Max][Max]; 9 struct 阅读全文
posted @ 2012-07-19 11:40 zlyblog 阅读(245) 评论(0) 推荐(0) 编辑
摘要:杭电1874View Code 1 //1874畅通工程续 2 #include<stdio.h> 3 #include<string.h> 4 #define Max 10005 5 int f[Max][Max]; 6 int main() 7 { 8 int n,m,i,j,k,min,x,y,z,a,b; 9 while(scanf("%d%d",&n,&m)!=-1)10 {11 for(i=0;i<n;i++)12 for(j=0;j<n;j++)13 f[i][j]=Max;14 ... 阅读全文
posted @ 2012-07-18 14:26 zlyblog 阅读(94) 评论(0) 推荐(0) 编辑
摘要:北大oj1182rank[x]=0 表示节点x与father[x]为同类1 表示节点x吃father[x]2表示x被father[x]吃向量的思考模式AB=rank[a],CB=rank[c];BC=-rank[c];a与c的关系为rank[a]-rank[c];判断两个节点点a, b的关系. (1)如果ra != rb,说明a, b暂时没有关系,那么关于他们的判断都是正确的,然后合并这两个子树。这里是关键,如何合并两个子树使得合并后的新树能保证正确呢?( 将a所在的子树合并到b上)s表示 a与b的关系 s=rank[a]+rank[f1]-rank[b] rank[f1]= s-rank[a 阅读全文
posted @ 2012-07-17 20:23 zlyblog 阅读(170) 评论(0) 推荐(0) 编辑
摘要:杭电1233本题首先要判断两个村庄距离是否最短,其次,两村庄是否联通,即其根结点是否相同;方法是将有联系的村庄编号存为数组,将其距离存为对应值,找出不同根结点之间的最小距离,然后相加,得出需建的最短公路;View Code 1 //杭电1233 2 //C++提交 3 #include<stdio.h> 4 #include<string.h> 5 #define Max 65535 6 int n; 7 int f[101][101],set[101]; 8 void power() 9 {10 int i,j,min=f[1][1],k=0,x=1,y=1,totl 阅读全文
posted @ 2012-07-17 10:42 zlyblog 阅读(306) 评论(0) 推荐(0) 编辑
摘要:小希的迷宫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 阅读(179) 评论(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 阅读(230) 评论(0) 推荐(0) 编辑
摘要:f(x)=5*x^13+13*x^5+k*a*x=x(5*x^12+13*x^4+k*a),这个函数的形式直接就是费马小定理的形式费马小定理是数论中的一个重要定理,其内容为: 假如p是质数,且(a,p)=1,那么 a^(p-1) ≡1(mod p) 假如p是质数,且a,p互质,那么 a的(p-1)次方除以p的余数恒等于1对f(x)=x(5*x^12+13*x^4+k*a)用此定理分析:(1)如果x是65的倍数,那么已经符合65整除f(x)(2)如果x是5的倍数,只要5*x^12+13*x^4+k*a被13整除即可,去掉13的倍数13*x^4,也即5*x^12+k*a被13整除,由费马小定理,5 阅读全文
posted @ 2012-07-14 15:07 zlyblog 阅读(880) 评论(0) 推荐(2) 编辑
摘要:(转载)觉得很不错View Code 1 /*优先队列*/ 2 3 //Memory Time 4 //376K 516MS 5 6 #include<iostream> 7 using namespace std; 8 9 int cmp(const void* a,const void* b)10 {11 return *(int*)a-*(int*)b;12 }13 14 int main(void)15 {16 int n;17 while(cin>>n)18 {19 __int64 * w=new __int64[n+1... 阅读全文
posted @ 2012-07-14 09:48 zlyblog 阅读(147) 评论(0) 推荐(0) 编辑
摘要:View Code 1 //杭电1028Ignatius and the Princess III 2 /* 3 4 = 4; 4 4 = 3 + 1; 5 4 = 2 + 2; 6 4 = 2 + 1 + 1; 7 4 = 1 + 1 + 1 + 1; 8 9 Sample Input10 411 1012 2013 14 15 Sample Output16 517 4218 62719 */20 #include<stdio.h>21 int num[121][121] = {0};22 int q(int m,int n)23 {24 if(m == 0)m =... 阅读全文
posted @ 2012-07-13 19:21 zlyblog 阅读(195) 评论(0) 推荐(0) 编辑
摘要:View Code 1 //杭电1297Children’s Queue 2 //关于大整数加法 3 #include<stdio.h> 4 #include<string.h> 5 6 char* add(char* s1,char* s2)//用指针定义变量 7 { 8 int len1,len2,i,j,k,p; 9 int a[1009],b[1009];10 int max;11 char s3[1009];12 len1=strlen(s1);13 len2=strlen(s2);14 max=len1;15 if... 阅读全文
posted @ 2012-07-11 11:36 zlyblog 阅读(267) 评论(0) 推荐(0) 编辑
摘要:View Code 1 //1284钱币兑换问题 2 //用1分 2分 3分 3 #include<stdio.h> 4 int main() 5 { 6 int n,j; 7 __int64 sum; 8 while(scanf("%d",&n)!=-1) 9 { sum=0;10 for(j=0;j<=n/3;j++)11 sum+=(n-j*3)/2+1;12 printf("%I64d\n",sum);13 }14 return 0;15 } 阅读全文
posted @ 2012-07-11 11:08 zlyblog 阅读(180) 评论(0) 推荐(0) 编辑
摘要:View Code 1 //杭电2067 2 //catalan加泰罗尼亚数 3 #include<stdio.h> 4 #include<string.h> 5 6 int main() 7 { 8 int n,i,c,j; 9 __int64 f[40][40];10 memset(f,0,sizeof(f));11 f[0][0]=1;12 for(i=0;i<36;i++)13 for(j=0;j<=i;j++)14 {15 if(i==j&&j==0)16 ... 阅读全文
posted @ 2012-07-09 19:44 zlyblog 阅读(348) 评论(0) 推荐(0) 编辑
摘要:医学界发现的新病毒因其蔓延速度和Internet上传播的"红色病毒"不相上下,被称为"红色病毒",经研究发现,该病毒及其变种的DNA的一条单链中,胞嘧啶,腺嘧啶均是成对出现的。 现在有一长度为N的字符串,满足一下条件: (1) 字符串仅由A,B,C,D四个字母组成; (2) A出现偶数次(也可以不出现); (3) C出现偶数次(也可以不出现); 计算满足条件的字符串个数. 当N=2时,所有满足条件的字符串有如下6个:BB,BD,DB,DD,AA,CC. 由于这个数据肯能非常庞大,你只要给出最后两位数字即可.View Code 1 //杭电2065 2 / 阅读全文
posted @ 2012-07-09 18:42 zlyblog 阅读(378) 评论(0) 推荐(0) 编辑
摘要:(1) n条直线最多分平面问题 题目大致如:n条直线,最多可以把平面分为多少个区域。 析:可能你以前就见过这题目,这充其量是一道初中的思考题。但一个类型的题目还是从简单的入手,才容易发现规律。当有n-1条直线时,平面最多被分成了f(n-1)个区域。则第n条直线要是切成的区域数最多,就必须与每条直线相交且不能有同一交点。 这样就会得到n-1个交点。这些交点将第n条直线分为2条射线和n-2条线断。而每条射线和线断将以有的区域一分为二。这样就多出了2+(n-2)个区域。 故:f(n)=f(n-1)+n =f(n-2)+(n-1)+n …… =f(1)+1+2+……+n =n(n+1)/2+1 (2) 阅读全文
posted @ 2012-07-09 15:19 zlyblog 阅读(431) 评论(0) 推荐(0) 编辑
摘要:最小公倍数算法View Code 1 View Code 2 /*两个数的最小公倍数*/ 3 #include<stdio.h> 4 int main() 5 { 6 int t,x,y,r,p,b; 7 scanf("%d",&t); 8 while(t--) 9 {10 scanf("%d%d",&x,&y);11 if(x==0||y==0)12 {13 b=0;break;14 }15 if(x<y)16 {17 p=x;x=y;y=p;18 }19 20 b=x;21 while(... 阅读全文
posted @ 2012-07-07 16:28 zlyblog 阅读(169) 评论(0) 推荐(0) 编辑
摘要:0~2000000000中能被2,3,5,7整除的数View Code 1 //杭电1058 2 /* 3 1 The 1st humble number is 1. 4 2 The 2nd humble number is 2. 5 3 The 3rd humble number is 3. 6 4 The 4th humble number is 4. 7 11 The 11th humble number is 12. 8 12 The... 阅读全文
posted @ 2012-07-05 16:43 zlyblog 阅读(250) 评论(0) 推荐(0) 编辑
摘要:平面上有N条直线,且无三点共点,View Code 1 //杭电1466 2 /* 3 2 4 3 5 6 7 0 1 8 0 2 3 9 */10 #include <stdio.h>11 #include <stdlib.h>12 #include <string.h>13 int main ()14 {15 int dp[21][191],i,j,r,n,max;16 17 memset(dp,0,sizeof(dp)); //数组dp空间初始化为018 19 for(i=0;i<21;i++)20 dp[i][0]=1; ... 阅读全文
posted @ 2012-07-05 11:02 zlyblog 阅读(245) 评论(0) 推荐(0) 编辑
摘要:View Code 1 //杭电1087 2 /* 3 3 1 3 2 4 4 1 2 3 4 5 4 3 3 2 1 6 0 7 8 9 410 1011 312 */13 #include<stdio.h>14 #include<string.h>15 16 int main()17 {18 int n,a[1010],b[1010],i,j,k,max1,max2;19 while(scanf("%d",&n),n!=0)20 {21 memset(a,0,sizeof(a));//将其清零22 memset(b,0,size... 阅读全文
posted @ 2012-07-05 09:10 zlyblog 阅读(257) 评论(0) 推荐(0) 编辑
摘要:Max SumView Code 1 //杭电1003 2 /*2 3 5 6 -1 5 4 -7 4 7 0 6 -1 1 -6 7 -5 5 6 Case 1: 7 14 1 4 8 9 Case 2:10 7 1 611 */12 #include<stdio.h>13 int main()14 {15 int t,n,a,i,j,start,end,temp;16 long max,sum;17 scanf("%d",&t);18 for(i=1;i<=t;i++)19 {20 sum=0;21 temp=1... 阅读全文
posted @ 2012-07-04 17:37 zlyblog 阅读(820) 评论(0) 推荐(0) 编辑
摘要:查找最长有序数列9View Code 1 /*解题方法 2 0 1 2 3 4 5 6 7 8 3 a[i] 1 4 7 2 5 8 3 6 9 4 c[i] 1 2 3 2 3 4 3 4 5 5 */ 6 #include<stdio.h> 7 int main() 8 { 9 int a[1000],b[1000],c[1000],i,j,k,n,x,max1,max2;10 while(scanf("%d",&n),n!=0)11 {12 for(i=0;i<n;i++)13 {14 scanf... 阅读全文
posted @ 2012-07-04 11:18 zlyblog 阅读(262) 评论(0) 推荐(0) 编辑
摘要:View Code 1 //数塔问题 2 //求数塔最大的和 3 /* 4 5 9 6 12 15 7 10 6 8 8 2 18 19 5 9 19 7 10 4 1610 */ 11 #include<stdio.h>12 int main()13 {14 int a[100][100],i,j,b,c;15 int n;16 while(scanf("%d",&n),n!=0)17 {18 for(i=0;i<n;i++)19 {20 for(j=0;j<=i;j++)21 ... 阅读全文
posted @ 2012-07-04 11:16 zlyblog 阅读(179) 评论(0) 推荐(0) 编辑
摘要:View Code 1 #include<stdio.h> 2 #include<string.h> 3 #include<stdlib.h> 4 int main() 5 { 6 char s[10000]; 7 int i,num,b; 8 while(scanf("%s",s)!=-1) 9 {10 b=atoi(s);11 if(b==0)12 break;13 num=0;14 for(i=0;s[i]!='\0';i++)15 16 ... 阅读全文
posted @ 2012-07-04 09:21 zlyblog 阅读(179) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示