【例题3-1 UVA - 272 】TEX Quotes
UVa 例题
2023-09-14 09:03:45 时间
【链接】 我是链接,点我呀:)
【题意】
【题解】
大水题。 用一个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;
}
相关文章
- UVa 10082 WERTYU
- 【习题 4-3 UVA - 220】Othello
- 【例题 8-15 UVA - 12174】Shuffle
- 【例题 8-1 UVA 120 】Stacks of Flapjacks
- 【习题 7-9 UVA-1604】Cubic Eight-Puzzle
- 【习题 7-8 UVA-12107】Digit Puzzle
- 【例题 7-14 UVA-1602】Lattice Animals
- 【例题 7-2 UVA - 11059】Maximum Product
- 【例题 6-17 UVa 10562】Undraw the Trees
- 【习题 6-5 UVA-1600】Patrol Robot
- 【习题 3-12 UVA - 11809】Floating-Point Numbers
- 【例题 6-15 UVA - 10129】Play on Words
- 【例题 6-14 UVA-816】Abbott's Revenge
- 【例题 6-13 UVA - 1103】Ancient Messages
- 【例题 6-8 UVA - 548】Tree
- 【习题 5-11 UVA 12504 】Updating a Dictionary
- 【习题 5-10 UVA-1597】Searching the Web
- 【习题 5-9 UVA - 1596】Bug Hunt
- 【例题5-8 UVA - 400】Unix ls
- 【例题5-6 UVA 540 】Team Queue
- 【Uva 10118】Free Candies
- UVa 10188 - Automated Judge Script