poj 1488 TEX Quotes(简单的串)
来源:互联网 发布:linux mysql5.7 编辑:程序博客网 时间:2024/05/29 11:28
(⊙o⊙)…,心情不好,过来写水题…
题意:1.第一个“ 替换成 ``
2.第二个“ 替换成‘’(注意第二个是两个单引号)
3.注意,这是一段话,前面两点在这整段话中是适用到底的,但是,不是要求一下输入完所有行,有一行就输出一行。
然后输入的话,用一个getline(cin,str); 因为要输入空格。然后,剩下的就非常水了,读题很重要
#include<iostream>#include<string>using namespace std;int main(){string a ;int count = 0;while(getline(cin,a)){for(int i =0;i<a.length();i++){if(a[i]=='\"'){if(count == 0){cout<<"``";count =1;}else {count =0;cout<<"''";}}else cout<<a[i];}cout<<endl;}}
- poj 1488 TEX Quotes(简单的串)
- POJ 1488 TEX Quotes
- [POJ]1488 TEX Quotes
- POJ 1488 TEX Quotes
- poj 1488 TEX Quotes
- poj 1488 TEX Quotes
- POJ-1488TEX Quotes
- POJ 1488 TEX Quotes
- poj 1488 TEX Quotes
- POJ 1488 TEX Quotes
- POJ 1488 - TEX Quotes
- POJ 1488 TEX Quotes 串 水
- POJ 1488: TEX Quotes 题解
- POJ - 1488 - TEX Quotes (字符串!)
- poj 1488 TEX Quotes 【水题】
- POJ 1488:TEX Quotes【字符串】
- POJ 1488 TEX Quotes 笔记
- Tex Quotes (P45) / POJ 1488
- 抽象类可以继承实体类吗?
- oracle 11g 在线重定义(online redefinition)介绍
- 《JavaScript语言精粹》--附录A :毒瘤
- 同时查询最大最小值的效率问题
- 某大型银行深化系统之二:设计策略
- poj 1488 TEX Quotes(简单的串)
- 设计模式一 概念
- 收集的有效的修改按钮背景色的方法
- oracle11g新特性
- viewState 与session比较
- 5. Drawable、Bitmap、Canvas和Paint的关系
- 祝福自己
- Windows核心编程-新旧API速查表
- 题目1023:EXCEL排序