POJ 1488 Tex Quotes --- 水题
题目大意:给定一篇文章,将它的左引号转成 ``(1的左边),右引号转成 ''(两个 ' )
解题思路:水题,设置一个bool变量标记是左引号还是右引号即可
/* POJ 1488 Tex Quotes --- 水题 */
#include <cstdio>
#include <cstring> int main()
{
#ifdef _LOCAL
freopen("D:\\input.txt", "r", stdin);
#endif char c;
bool flag = ;
while ((c = getchar()) != EOF) {
if ('"' == c){
printf("%s", flag ? "''" : "``");
flag = !flag;
}
else{
putchar(c);
}
} return ;
}
POJ 1488 Tex Quotes --- 水题的更多相关文章
- UVa 272 Tex Quotes --- 水题
		题目大意:在TeX中,左引号是 ``,右引号是 ''.输入一篇包含双引号的文章,你的任务是把他转成TeX的格式 解题思路:水题,定义一个变量标记是左引号还是右引号即可 /* UVa 272 Tex Q ... 
- POJ 1488 - TEX Quotes
		Description TEX is a typesetting language developed by Donald Knuth. It takes source text together w ... 
- POJ 3641 Oulipo KMP 水题
		http://poj.org/problem?id=3461 直接KMP就好.水题 #include<cstdio> #include<cstring> const int M ... 
- poj 1006:Biorhythms(水题,经典题,中国剩余定理)
		Biorhythms Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 110991 Accepted: 34541 Des ... 
- poj 1002:487-3279(水题,提高题 / hash)
		487-3279 Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 236746 Accepted: 41288 Descr ... 
- poj 1003:Hangover(水题,数学模拟)
		Hangover Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 99450 Accepted: 48213 Descri ... 
- poj 2105 IP Address(水题)
		一.Description Suppose you are reading byte streams from any device, representing IP addresses. Your ... 
- poj 2000 Gold Coins(水题)
		一.Description The king pays his loyal knight in gold coins. On the first day of his service, the kni ... 
- POJ 3673 Cow Multiplication (水题)
		题意:给你两个数,求所有的数位的积的和. 析:太水了,没的说,可以先输入边算,也可以最后再算,一样.. 代码如下: #include <cstdio> #include <strin ... 
随机推荐
- 百胜集团李磊:BPM实现业务流程全过程无缝链接
			作为全球最大的餐饮企业之一,百胜集团在形成规模化连锁经营效应的同时,战略地利用信息化手段,强化管理和运营水平,打造企业的核心竞争力.通过流程梳理,百胜集团实现了以规模化.规范化.信息化和现代化为主题的 ... 
- hdu 1033 (bit masking, utilization of switch, '\0' as end of c string)                                                       分类:            hdoj             2015-06-15 21:47    37人阅读    评论(0)    收藏
			bit masking is very common on the lower level code. #include <cstdio> #include <algorithm&g ... 
- 【转发】RedHat Enterprise Linux 6.4 使用 Centos 6 的yum源问题
			作为一名新手,学习Linux已经一个月了,其间遇到了不少问题,而今天笔者遇到的问题是 #yum install pam-devel #This system is not registered to ... 
- Allow windows service to "Interact with desktop"
			Typically, services are designed to run unattended without any UI with any need to interact with des ... 
- iOS开发XCODE5 SVN配置 使用办法
			第一次弄svn版本控制,折腾了好久一直都出错!无意间看到一篇文章!貌似解决了,很感谢“代码妖娆” 的详细流程(http://blog.sina.com.cn/s/blog_68661bd80101ph ... 
- (转)HTML5 本地存储
			原文:http://www.cnblogs.com/rainman/archive/2011/06/22/2086069.html HTML5 本地存储 1.sessionStorage 2.loca ... 
- SAP财务常用数据源概览
			一. 0FI_GL_10总分类账:领先分类账余额 Delta Update : AIED After Images Marked for Deletion via Extractor (FI-GL/A ... 
- UITableView全面解析,讲的好详细
			--UIKit之UITableView 概述 在iOS开发中UITableView可以说是使用最广泛的控件,我们平时使用的软件中到处都可以看到它的影子,类似于微信.QQ.新浪微博等软件基本上随处都是U ... 
- iOS log第三方库之间的对比
- Unity3D ShaderLab 漫反射卷积光照模型
			Unity3D ShaderLab 漫反射卷积光照模型 漫反射卷积[Diffuse convolution]是一个模糊立方体的过程,它保留了立方图的整体光照强度,只模糊了细节. 这种效果在我们要活得一 ... 
