成长轨迹44 【ACM算法之路 百炼poj.grids.cn】【字符串处理】【2799、2976、2975、2742】
2012-02-12 11:19
232 查看
一次ac的就不说啥了。。
2799:浮点数格式
View Code
2799:浮点数格式
View Code
#include <cstdio> #include <string.h> int main() { int t; int n[26]; scanf("%d",&t); for(int i=0;i<t;i++) { memset(n,0,sizeof(n)); char s[1010]; scanf("%s",s); int len = strlen(s); for(int j=0;j<len;j++) { n[s[j]-'a']++; } int max=0; for(int j=1;j<26;j++) { if(n[max]<n[j]) max=j; } printf("%c %d\n",'a'+max,n[max]); } return 0; }
相关文章推荐
- 成长轨迹50 【ACM算法之路 百炼poj.grids.cn】【字符串处理】【2974:487-3279】
- 成长轨迹51 【ACM算法之路 百炼poj.grids.cn】【字符串处理】【2744:子串】
- 成长轨迹45 【ACM算法之路 百炼poj.grids.cn】【字符串处理】【2797:最短前缀】
- 成长轨迹52 【ACM算法之路 百炼poj.grids.cn】【字符串处理】【2743:字符串判等】
- 成长轨迹46 【ACM算法之路 百炼poj.grids.cn】【字符串处理】【2804:词典】
- 成长轨迹47 【ACM算法之路 百炼poj.grids.cn】【字符串处理】【2820:古代密码】
- 成长轨迹48 【ACM算法之路 百炼poj.grids.cn】【字符串处理】【2818:密码】
- 成长轨迹49 【ACM算法之路 百炼poj.grids.cn】【字符串处理】【2819:W的密码】
- 成长轨迹42 【ACM算法之路 百炼poj.grids.cn】【数值转换】【2972、2798、2735、2734、2973】
- 成长轨迹57 【ACM算法之路 百炼poj.grids.cn】【递归】【2754、2816、2753、】
- 成长轨迹59 【ACM算法之路 百炼poj.grids.cn】【递归】【2694:逆波兰表达式】
- 成长轨迹53 【ACM算法之路 百炼poj.grids.cn】【简单枚举】【2747、2810、2692、2977】
- 成长轨迹58 【ACM算法之路 百炼poj.grids.cn】【递归】【1664:放苹果】
- 成长轨迹60 【ACM算法之路 百炼poj.grids.cn】【递归】【2756:二叉树】
- 成长轨迹54 【ACM算法之路 百炼poj.grids.cn】【简单枚举】【2739:计算对数】
- 成长轨迹61 【ACM算法之路 百炼poj.grids.cn】【动态规划】【2806、1661、2757】
- 成长轨迹55 【ACM算法之路 百炼poj.grids.cn】【简单枚举】【2812:恼人的青蛙】
- 成长轨迹56 【ACM算法之路 百炼poj.grids.cn】【简单枚举】【2811:熄灯问题】
- 成长轨迹43 【ACM算法之路 百炼poj.grids.cn】【数值转换】【2765:八进制小数】
- OpenJudge百炼-2799-浮点数格式-C语言-字符串处理