词组缩写 2564
来源:互联网 发布:好看的男士手套知乎 编辑:程序博客网 时间:2024/05/17 06:24
Problem Description
定义:一个词组中每个单词的首字母的大写组合称为该词组的缩写。
比如,C语言里常用的EOF就是end of file的缩写。
Input
输入的第一行是一个整数T,表示一共有T组测试数据;
接下来有T行,每组测试数据占一行,每行有一个词组,每个词组由一个或多个单词组成;每组的单词个数不超过10个,每个单词有一个或多个大写或小写字母组成;
单词长度不超过10,由一个或多个空格分隔这些单词。
Output
请为每组测试数据输出规定的缩写,每组输出占一行。
Sample Input
1
end of file
Sample Output
EOF
#include <iostream>#include <string>#include <sstream>#include <cctype>int main(int argc, const char *argv[]){ int nTestNum; std::cin >> nTestNum; std::cin.get(); while(nTestNum --) { std::string strTemp; std::string strResult; getline(std::cin, strTemp); std::stringstream str(strTemp); while(str.eof() == false) { strTemp.clear(); str >> strTemp; if(strTemp.empty()) { continue; } strResult += toupper(strTemp.at(0)); } std::cout << strResult << std::endl; } return 0;}
- 词组缩写 2564
- hdu 2564 词组缩写
- hd 2564词组缩写
- HDU-2564-词组缩写
- 词组缩写 2564HDU
- 2564:词组缩写
- hdu 2564 词组缩写
- HDU 2564 词组缩写
- HDU 2564 词组缩写
- 词组缩写 HDU-2564
- 杭电2564----词组缩写
- HDOJ/HDU 2564 词组缩写(单词缩写)
- 词组缩写
- 词组缩写
- 词组缩写
- 词组缩写
- 词组缩写
- 词组缩写
- bosh.yml
- 【菜鸟入门】stm32 之 实时时钟
- Android 中常见Bitmap操作
- 树状数组 POJ 2352 Star
- 获取Android手机中所有的短信
- 词组缩写 2564
- combotree异步加载 combotree点击加载
- openerp创建动态视图-fields_view_get
- 数据结构与算法分析学习笔记二-栈的C语言实现
- jsp统计当前在线人员
- jQuery.extend 函数详解
- Linux服务器故障排查
- java文件操作
- switch代替if else实现学生成绩等级的判定,switch实现域的判定