#include<stdio.h>
int main(){
int ch[200],ans[200],top=0,i,j;
char c;
for(i=0;i<200;i++) ch[i]=0;
while((c=getchar())!=EOF){
if(c=='\n'){
for(i=0;i<200;i++)
if(ch[i]!=0)
ans[top++]=i;;
for(i=0;i<top;i++)
for(j=i;j<top;j++)
if(ch[ans[i]]>=ch[ans[j]]){
int t;
t=ans[i],ans[i]=ans[j],ans[j]=t;
}
for(i=0;i<top;i++)
printf("%X %d\n",ans[i],ch[ans[i]]);
puts("");
for(i=0;i<200;i++) ch[i]=0;
top=0;
}
else{
ch[c]++;
}
}
return 0;
}
//21 - 7f = 5E =94
2012年12月24日 星期一
ITSA14
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言