#include <iostream>
#include <string>
#define MAXN 26
using namespace std; int _m[MAXN]; int main()
{
//freopen("acm.acm","r",stdin);
int max = -;
string s;
int i;
int k;
memset(_m,,sizeof(_m));
for(k = ; k < ; ++ k)
{
getline(cin,s);
for(i = ; i < s.length(); ++ i)
{
if(s[i] >= 'A' && s[i] <= 'Z')
{
++ _m[ s[i] - 'A' ];
}
} }
for(i = ; i < MAXN; ++ i)
{
if(_m[i] > max)
{
max = _m[i];
}
}
// cout<<max<<endl;
for(i = max; i >= ; -- i)
{
for(k = ; k < MAXN; ++ k)
{
if(_m[k] >= i)
{
cout<<'*';
}
else
{
cout<<' ';
}
cout<<' ';
}
cout<<endl;
}
for(char j = 'A'; j <= 'Z'; ++ j)
{
cout<<j<<' ';
}
cout<<endl;
}

关注我的公众号,当然,如果你对Java, Scala, Python等技术经验,以及编程日记,感兴趣的话。

技术网站地址: vmfor.com

POJ 2136的更多相关文章

  1. poj 2136 Vertical Histogram 解题报告

    题目链接:http://poj.org/problem?id=2136 题意不难理解,就是输入四行字符串(每行字符总数不超过72个),统计26个英文字母的数目,并按柱状图的形式输出.我的思路就是,先用 ...

  2. 打表格,字符串处理,POJ(2136)

    题目链接:http://poj.org/problem?id=2136 水题WA了半天,结果是数组开小了. #include <stdio.h> #include <string.h ...

  3. POJ 2136 Vertical Histogram

    题意:按样例那样模拟…… 解法:模拟…… 代码: #include<stdio.h> #include<iostream> #include<algorithm> ...

  4. Poj 2136 Vertical Histogram(打印垂直直方图)

    一.Description Write a program to read four lines of upper case (i.e., all CAPITAL LETTERS) text inpu ...

  5. POJ 2136 Vertical Histogram(当时写的比较恶心,优化一下)

    Vertical Histogram Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 21223 Accepted: 10048 ...

  6. POJ 题目分类(转载)

    Log 2016-3-21 网上找的POJ分类,来源已经不清楚了.百度能百度到一大把.贴一份在博客上,鞭策自己刷题,不能偷懒!! 初期: 一.基本算法: (1)枚举. (poj1753,poj2965 ...

  7. (转)POJ题目分类

    初期:一.基本算法:     (1)枚举. (poj1753,poj2965)     (2)贪心(poj1328,poj2109,poj2586)     (3)递归和分治法.     (4)递推. ...

  8. poj分类

    初期: 一.基本算法:      (1)枚举. (poj1753,poj2965)      (2)贪心(poj1328,poj2109,poj2586)      (3)递归和分治法.      ( ...

  9. poj 题目分类(1)

    poj 题目分类 按照ac的代码长度分类(主要参考最短代码和自己写的代码) 短代码:0.01K--0.50K:中短代码:0.51K--1.00K:中等代码量:1.01K--2.00K:长代码:2.01 ...

随机推荐

  1. c++编程规范的纲要和记录

    这是一本好书, 可以让你认清自己对C++的掌握程度.看完之后,给自己打分,我对C++了解多少? 答案是不足20分.对于我自己是理所当然的问题, 就不提了, 记一些有启发的条目和细节: (*号表示不能完 ...

  2. poj 2312 Battle City

    题目连接 http://poj.org/problem?id=1840 Battle City Description Many of us had played the game "Bat ...

  3. hdu 1874 畅通工程续

    题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=1874 畅通工程续 Description 某省自从实行了很多年的畅通工程计划后,终于修建了很多路.不过 ...

  4. ubuntu server获取并自动设置最快镜像的方法

    一,安装方法1 add-apt-repository ppa:ossug-hychen/getfastmirrorapt-get install getfastmirror 如果添加了临时源,这样移除 ...

  5. 发现了一个制作iOS图标的利器

    我制作的第一个Swift Demo已经将近完工,今天的任务便是给它添加图标.不过Xcode中对图标尺寸的要求还真是严苛,若是制作iPhone和iPad通用的应用,总共需要12种尺寸的图标,这对于美工功 ...

  6. 1.总结---tr()和QTextCodec对象

    1. 关于Qt 中的tr()函数-------http://tscsh.blog.163.com/blog/static/200320103201310213312518/ 在论坛中漂,经常遇到有人遇 ...

  7. 33.allegro中Autosilk top, Silkscreen top 和Assembly top三个什么区别(转)

    Autosilk top, Silkscreen top 和Assembly top Autosilk top:最后出gerber的时候,自动生成的丝印层.会自动调整丝印位置,以及碰到阻焊开窗的地方, ...

  8. button swift

    // // ViewController.swift // UILabelTest // // Created by mac on 15/6/23. // Copyright (c) 2015年 fa ...

  9. 微软职位内部推荐-Software Engineer II-Web app

    微软近期Open的职位: The Office App Services team is working on the powerful Office Web Apps including Word ...

  10. c++实例化对象

    今天看到c++实例化对象,有点懵了.Activity_Log the_log (theLogPtr, Tree->GetBranch());这是那一段小代码,开始没看懂.java看习惯了总喜欢n ...