UVA 272 TEX Quotes
TEX Quotes
题意:
变引号。
题解:
要想进步,真的要看一本好书,紫书P45
代码:
#include<stdio.h>
int main()
{
int c,q=1;
while((c=getchar())!=EOF)
{
if (c=='"'){printf("%s",q?"``":"''");q=!q;}
else printf("%c",c);
}
}
UVA 272 TEX Quotes的更多相关文章
- UVa 272 Tex Quotes --- 水题
题目大意:在TeX中,左引号是 ``,右引号是 ''.输入一篇包含双引号的文章,你的任务是把他转成TeX的格式 解题思路:水题,定义一个变量标记是左引号还是右引号即可 /* UVa 272 Tex Q ...
- UVA 272 TEX Quotes【字符串】
https://vjudge.net/problem/UVA-272 [分析]:标记一下. [代码]: #include <bits/stdc++.h> using namespace s ...
- 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 Quotes(字符串,水)
TEX Quotes Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 9674 Accepted: 5073 Descri ...
- TeX中的引号(Tex Quotes, UVa 272)
在TeX中,左双引号是“``”,右双引号是“''”.输入一篇包含双引号的文章,你的任务是 把它转换成TeX的格式. 样例输入: "To be or not to be," quot ...
随机推荐
- jquery 按回城 等于提交按钮
$(document).keydown(function(e){ if(e.keyCode==13){ $('.bu ...
- 不小心误删@‘local’操作恢复
今天在测试用户权限的时候不小心把User: ''@'localhost';用户删除了 导致任何用户登录都无权限操作 恢复过程 停止mysql服务:在mysql安装目录下找到my.ini(linux下是 ...
- springMvc源码学习之:spirngMvc的参数注入的问题
转载:https://my.oschina.net/lichhao/blog/172562 概述 在SpringMVC中,可以使用@RequestBody和@ResponseBody两个注解,分别完成 ...
- when compile /home/wangxiao/NVIDIA-CUDA-7.5 SAMPLES, it warning: gcc version larger than 4.9 not supported, so: old verson of gcc and g++ are needed
1. when compile /home/wangxiao/NVIDIA-CUDA-7.5 SAMPLES, it warning: gcc version larger than 4.9 not ...
- CUDA学习笔记(一)【转】
CUDA编程中,习惯称CPU为Host,GPU为Device.编程中最开始接触的东西恐怕是并行架构,诸如Grid.Block的区别会让人一头雾水,我所看的书上所讲述的内容比较抽象,对这些概念的内容没有 ...
- ORA-01089 数据库无法正常关闭
今天在做SOA几个数据库的重启操作,其中一个数据库在关闭过程中一直处于HANG住状态,十几分钟没有任何进展,具体操作过程如下: 一:当时的情景 SQL> shutdown immediate - ...
- SQL 语句中的With(index())
SELECT m.Member_No, m.FirstName, m.Region_No FROM dbo.Member AS m WITH (INDEX (0)) 强制使用找到的第一个索引. 其 ...
- unity,生成的mac版游戏切场景时卡死解法
unity版本为5.1.1,在编辑器里运行没问题,build出的windows版运行也没问题,但build出的mac版在个别场景切换时会卡死,通过查看log(查看build版本log的方法参考:htt ...
- unity, collider/trigger on children
参考:http://answers.unity3d.com/questions/410711/trigger-in-child-object-calls-ontriggerenter-in-pa.ht ...
- OpenJudge就算概论-最长单词2【寻找句子内部最长的单词】
/*===================================== 最长单词2 总时间限制: 1000ms 内存限制: 65536kB 描述 一个以'.'结尾的简单英文句子,单词之间用空格 ...