【例题3-1 UVA - 272 】TEX Quotes
【链接】 我是链接,点我呀:)
【题意】
在这里输入题意
【题解】
大水题。
用一个int记录遇到的是左括号还是右括号。
【错的次数】
在这里输入错的次数
【反思】
在这里输入反思
【代码】
#include <bits/stdc++.h>
using namespace std;
char key;
int main()
{
//freopen("F:\\rush.txt", "r", stdin);
int flag = 1;
while ((key = getchar()) != EOF)
{
if (key == '"')
{
if (flag == 1)
printf("``");
else
printf("''");
flag = !flag;
}
else
putchar(key);
}
return 0;
}
【例题3-1 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 ...
- 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 ...
- 例题3_1 TeX中的引号(TeX Quotes,UVa 272)
在TeX中,左双引号是“``”,右双引号是“''”.输入一篇包含双引号的文章,你的任务是把它转换成TeX的格式. 样例输入: "To be or not to be,"quoth ...
随机推荐
- 2017国家集训队作业[arc076d/f][Exhausted?]
2017国家集训队作业[arc076d/f][Exhausted?] 题意: 有\(N\)个人,\(M\)把椅子,给出\(...L_i.R_i\)表示第\(i\)个人可以选择编号为\(1\sim ...
- Vue 实现分页+输入框关键字筛选
分页的实现(Vue+Element)+输入框关键字筛选 1.这里用的是Element 自带的分页组件 <template> <div class="sales-table& ...
- 【Django】ContentType组件
目录 理解 表结构 使用 @ 好,现在我们有这样一个需求,我们的商城里有很多的商品,然而节日要来了,我们要搞活动. 那么,我们就要设计优惠券,优惠券都有什么类型呢?满减的.折扣的.立减的.等等等... ...
- asp.net core系列 39 Razor 介绍与详细示例
原文:asp.net core系列 39 Razor 介绍与详细示例 一. Razor介绍 在使用ASP.NET Core Web开发时, ASP.NET Core MVC 提供了一个新特性Razor ...
- xml格式报文的拼装,和解析成实体类
我们的微信支付,使用的是第三方的支付,某银行的微信支持渠道.所有的接口请求.应答都是xml格式报文,这样就需要用到xml格式报文的拼装和解析,这儿简单讲一下. 拼接xml格式报文. 从页面表单提交和配 ...
- 洛谷——P2093 零件分组
https://www.luogu.org/problem/show?pid=2093 题目描述 某工厂生产一批棍状零件,每个零件都有一定的长度(Li)和重量(Wi).现在为了加工需要,要将它们分成若 ...
- [Angular] How to get Store state in ngrx Effect
For example, what you want to do is navgiate from current item to next or previous item. In your com ...
- OpenGL核心技术之混合技术
笔者介绍:姜雪伟,IT公司技术合伙人,IT高级讲师,CSDN社区专家,特邀编辑,畅销书作者.国家专利发明人;已出版书籍:<手把手教你架构3D游戏引擎>电子工业出版社和<Unity3D ...
- Android 关于expandableListView childrenView 点击改变颜色
1.点击后改变颜色并保持颜色改变状态: <?xml version="1.0" encoding="utf-8"?> <selector xm ...
- 11.Bean2Document-BEAN转document
1. package com.glodon.gspm.adapter.plugin.common; import com.glodon.cloudt.tenancy.context.TenantCon ...