Codeforces Round #127 (Div. 2)
来源:互联网 发布:2016最火的网络歌曲 编辑:程序博客网 时间:2024/05/20 06:51
A.LLPS
题解:说了那么多其实很简单,把字母按照ASCII码排个序,输出ASCII码最大的字母,有多少就输出多少。
代码:
#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>using namespace std;bool cmp(char a,char b){ return a>b;}int main(){ char str[15]; char x; int l; while(~scanf("%s",str)) { l=strlen(str); sort(str,str+l,cmp); x=str[0]; for(int i=0;i<l;i++) { if(str[i]==x) cout<<str[i]; } cout<<endl; } return 0;}
0 0
- Codeforces Round #127 (Div. 2)
- Codeforces Round #127 (Div. 2)
- Codeforces Round #127 (Div. 2)
- Codeforces Round #127 (Div. 2) A. LLPS
- Codeforces Round #127 (Div. 1)
- Codeforces Round #102 (Div. 2)
- Codeforces Round #103 (Div. 2)
- Codeforces Round #103 (Div. 2)
- Codeforces Round #104 (Div. 2)
- Codeforces Round #105 (Div. 2)
- Codeforces Round #105 (Div. 2)
- Codeforces Round #107 (Div. 2)
- Codeforces Round #108 (Div. 2)
- Codeforces Round #110 (Div. 2)
- Codeforces Round #122 (Div. 2)
- Codeforces Round #121 (Div. 2)
- Codeforces Round #124 (Div. 2)
- Codeforces Round #124 (Div. 2)
- JS获取浏览器的版本和类型
- 全局变量和静态变量
- hdu 3061 Battle 最大权闭合图
- 用JavaSE写的ATM系统
- SCU 4103 function(前缀处理+字典树)
- Codeforces Round #127 (Div. 2)
- 独家:文章称“还活着” 姚笛如何自保
- cocos2d 学习记录srcollView
- javascript中获取昨天、明天时间等
- 无证书开发
- OC中Block的使用
- Html常用的标签样式
- 麦克风阵列技术入门(1)
- Linux学习记录--启动流程