UVa OJ 10008-What's Cryptanalysis?
2011-01-31 00:32
471 查看
简单统计,水题:
{ Author:wzx961008 Problem:UVa 10008-What's Cryptanalysis? Verdict:Accepted Language:PASCAL Run Time:0.016s Submission Date:2011-01-30 16:26:08 } type letter=record c:char; num:longint; end; var i,j,n,top:longint; t:letter; c,ii:char; a:array[1..26]of letter; f:array['A'..'Z']of longint; begin readln(n); for i:=1 to n do begin while not eoln do begin read(c); if (c>='A')and(c<='z') then inc(f[upcase(c)]); end; readln; end; for ii:='A' to 'Z' do begin a[ord(ii)-64].c:=ii; a[ord(ii)-64].num:=f[ii]; end; for i:=1 to 25 do for j:=i+1 to 26 do if a[i].num<a[j].num then begin t:=a[i]; a[i]:=a[j]; a[j]:=t; end else if a[i].num=a[j].num then if a[i].c>a[j].c then begin t:=a[i]; a[i]:=a[j]; a[j]:=t; end; for i:=1 to 26 do if a[i].num<>0 then writeln(a[i].c,' ',a[i].num); end.
相关文章推荐
- UVa 10008 - What's Cryptanalysis?
- UVa 10008 What's Cryptanalysis? (water ver.)
- uva 10008 What's Cryptanalysis?
- (字符串的模式匹配4.7.8)UVA 10008 What's Cryptanalysis?(统计文本中某一个字符的出现的次数,需要从小到大排序&&同次数的按字段序排序)
- What's Cryptanalysis?(map)
- UVa10008:What's Cryptanalysis?
- UVA 10008 What's Cryptanalysis?
- UVA 10008 - What's Cryptanalysis?
- 10008 - What's Cryptanalysis?
- UVA 10008 whats cryptanalysis 水题
- uva 10008 What's Cryptanalysis?
- Uva-10008 (What's Cryptanalysis? )
- Disaster Recovery, High Availability, and Continuous Availability - What's the Difference?
- kaggle比赛练习_1: 做的什么菜?(What's Cooking?)
- What's up with BeginInvoke?
- POJ 1043 What's In A Name? 二分图推理
- what's in string? c语言string类函数实现汇总 觉得都是学习使用指针的好例子(算是读书摘抄和笔记吧)
- Base Point@What's the heap and stack?
- what's going on