POJ 2136 解题报告
来源:互联网 发布:java课程设计管理系统 编辑:程序博客网 时间:2024/05/11 15:05
简单题。
thestoryofsnow2136Accepted132K0MSC++1137B/* ID: thestor1 LANG: C++ TASK: poj2136 */#include <iostream>#include <fstream>#include <cmath>#include <cstdio>#include <cstring>#include <limits>#include <string>#include <vector>#include <list>#include <set>#include <map>#include <queue>#include <stack>#include <algorithm>#include <cassert>using namespace std;inline bool isUpperCase(char ch){return 'A' <= ch && ch <= 'Z';}int main(){int cnt[26] = {0};char line[74];for (int l = 0; l < 4; ++l){fgets(line, 74, stdin);for (int i = 0; line[i] != '\0'; ++i){if (isUpperCase(line[i])){cnt[line[i] - 'A']++;}}}int maxh = *max_element(cnt, cnt + 26);for (int h = maxh; h >= 1; --h){for (int i = 0; i < 26; ++i){if (cnt[i] >= h){printf("*");}else{printf(" ");}if (i != 25){printf(" ");}else{printf("\n");}}}for (int i = 0; i < 26; ++i){printf("%c", 'A' + i);if (i != 25){printf(" ");}else{printf("\n");}}return 0; }
0 0
- POJ 2136 解题报告
- poj数百篇解题报告
- poj 1141解题报告
- poj 1001解题报告
- poj 1011 解题报告
- poj 1087 解题报告
- poj 2153解题报告
- poj 2051解题报告
- POJ 1167 解题报告
- poj 1026 解题报告
- POJ 1077 解题报告
- POJ 1042 解题报告
- POJ 1095 解题报告
- POJ 1159解题报告
- poj 2312解题报告
- POJ 1001解题报告
- POJ 1002解题报告
- POJ 1006解题报告
- Redis学习(一)安装并测试
- VS2013 调试时 HTTP 错误 500.23 - Internal Server Error
- KindEditor图片上传到七牛云
- 【USACO4.3.2】素数方阵 搜索搜索!
- first blood!
- POJ 2136 解题报告
- OpenGL的一些基本概念
- 逃离大厦第80关与马踏棋盘
- 服务俄国人后天
- 说过的话认同几
- 网页客户端存储的方式(一)------- localStorage 和 SessionStorage的区别和使用
- 我对“硬盘分区”的愚见
- Leetcode: Word Break
- 关于Visual Studio 中添加/引用代码后不被编译的问题