UVA 272 TEX Quotes【字符串】
https://vjudge.net/problem/UVA-272
【分析】:标记一下。
【代码】:
- #include <bits/stdc++.h>
- using namespace std ;
- int n,m;
- int main()
- {
- int f=1; char c;
- while(scanf("%c",&c) != EOF)
- {
- if(c == '"')
- {
- printf("%s",f ? "``":"''");
- f=!f;
- }
- else
- {
- putchar(c);
- }
- }
- }
UVA 272 TEX Quotes【字符串】的更多相关文章
- UVa 272 Tex Quotes --- 水题
题目大意:在TeX中,左引号是 ``,右引号是 ''.输入一篇包含双引号的文章,你的任务是把他转成TeX的格式 解题思路:水题,定义一个变量标记是左引号还是右引号即可 /* UVa 272 Tex Q ...
- UVA 272 TEX Quotes
TEX Quotes 题意: 变引号. 题解: 要想进步,真的要看一本好书,紫书P45 代码: #include<stdio.h> int main() { int c,q=1; whil ...
- TEX Quotes(字符串,水)
TEX Quotes Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 9674 Accepted: 5073 Descri ...
- uva 272 Tex中的引号(Tex Quotes)
TeX is a typesetting language developed by Donald Knuth. It takes source text together with a few ty ...
- Uva - Uva272 - TEX Quotes
TeX is a typesetting language developed by Donald Knuth. It takes source text together with a few ty ...
- Uva272.TEX Quotes
题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem& ...
- 【UVA272】TEX Quotes
A - TEX Quotes Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Submitcid=80 ...
- POJ 1488 Tex Quotes --- 水题
POJ 1488 题目大意:给定一篇文章,将它的左引号转成 ``(1的左边),右引号转成 ''(两个 ' ) 解题思路:水题,设置一个bool变量标记是左引号还是右引号即可 /* POJ 1488 T ...
- TeX中的引号(Tex Quotes, UVa 272)
在TeX中,左双引号是“``”,右双引号是“''”.输入一篇包含双引号的文章,你的任务是 把它转换成TeX的格式. 样例输入: "To be or not to be," quot ...
随机推荐
- Reachability from the Capital
题目描述 There are nn cities and mm roads in Berland. Each road connects a pair of cities. The roads in ...
- linux命令行操作基本知识
乱七八糟的命令 . 表示当前目录 .. 表示上一级目录 ls 显示文件 -l 列表 -a 隐藏文件 -h 文件大小人性化显示 gedit 自带文本编辑器 subl 打开sublime > 重定向 ...
- 67、activity中调用fragment内部自定义的方法
fragment: /** * author: Created by zzl on 15/11/19. */ @SuppressLint("validFragment") publ ...
- Python之协程的实现
1.Python里面一般用gevent实现协程协程, 而协程就是在等待的时候切换去做别的操作,相当于将一个线程分块,充分利用资源 (1)低级版协程的实现 import gevent def test1 ...
- jdk -version could not open jvm.cfg 的解决办法
java 时出现 could not open jvm.cfg 的解决办法 问题描述: 重装JDK并更变目录后,出现JAVA -VERSION 出现could not open jvm.cf ...
- hadoop配置文件: hdfs-site.xml, mapred-site.xml
dfs.name.dir Determines where on the local filesystem the DFS name node should store the name table( ...
- ActionContext和ServletActionContext小结
1. ActionContext 在Struts2开发中,除了将请求参数自动设置到Action的字段中,我们往往也需要在Action里直接获取请求(Request)或会话(Session)的一些信息, ...
- Puppet单机实战之Nginx代理Tomcat
author:JevonWei 版权声明:原创作品 blog:http://119.23.52.191/ --- 构建实战之Nginx代理Tomcat [root@node1 modules]# mk ...
- Incorrect column count: expected 1, actual 6
JdbcTemplate使用时出现了一些问题: 解决办法:
- bzoj1086【SCOI2005】王室联邦
题意:http://www.lydsy.com/JudgeOnline/problem.php?id=1086 sol :这题水水啊,直接大力DFS就行了 首先当且仅当x<B时无解 对于以x为 ...