hdoj 2573
来源:互联网 发布:多点触摸软件 编辑:程序博客网 时间:2024/06/18 10:17
http://acm.hdu.edu.cn/showproblem.php?pid=2573
//字符串#include <iostream>#include <string>using namespace std;int main(){ int t, k; bool Caps; string str, res; cin >> t; while (t--) { cin >> k; Caps = false; res.clear(); while (k--) { cin >> str; if (str == "Caps") Caps = !Caps; if (str.find("Shift") != string::npos) { cin >> str; Caps = !Caps; if (Caps == false) res+=(tolower(str[0])); else res+=(toupper(str[0])); Caps = !Caps; continue; } if (str.length() == 1) { if (Caps == false) res+=(tolower(str[0])); else res+=(toupper(str[0])); } } cout << res << endl; } return 0;}
- hdoj 2573
- HDOJ
- hdoj
- hdoj
- HDOJ
- hdoj 1568 && hdoj 5344 && hdoj 5444
- HDOJ 2176
- Hdoj--1272
- hdoj 1003
- hdoj 1005
- hdoj 1030
- hdoj 2154
- hdoj 2100
- HDOJ 1106
- hdoj 1257
- hdoj 1159
- hdoj 1160
- hdoj 3283
- phonegap中设置横向全屏
- servlet获取参数
- hdoj 2552
- 递归求全排列
- 金牌太少,伤了俄罗斯的名族自尊心
- hdoj 2573
- 备忘录模式(Memento)
- C语言中的auto、 register、extern、static用法
- ubuntu下DDMS中android设备显示乱码
- JSON在线验证、编写、转换成xml工具
- hdoj 2524
- jena解析rdf、nt、ttl格式数据
- 当文档准备就绪时调用函数
- vc中GB2312,BIG5,Unicode相互转换