Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:怎会wa?In Reply To:怎会wa? Posted by:gzw_02 at 2008-07-07 10:30:30 > # include <stdio.h> > # include <string.h> > char seq[1001]; > > int main(){ > int i,n,len; > char pre; > scanf("%d",&n); > while(n--){ > scanf("%s",seq); > len=strlen(seq); > pre=0; > for(i=1;i<=len;i++){ > if(seq[pre]!=seq[i]){ > printf("%d%c",i-pre,seq[pre]); > pre=i; > } > } > putchar('\n'); > } > return 1; > } char pre ---> int pre Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator