UVA 10361-Automatic Poetry
来源:互联网 发布:python 时间精确度 编辑:程序博客网 时间:2024/06/07 12:10
UVA 10361-Automatic Poetry
题目大意: 给俩个字符串,第一个含有俩次<>,第二个以…结尾,输出第一条将第一个字符串的<>去掉,第二条将第二个字符串的…改为规定规律的字符串
解题思路: 边输入边输出边判断
#include <stdio.h>#include <string.h>#include <iostream>using namespace std;int main() { int n; cin >> n; getchar(); while(n--) { char t; char c[4][100]; for(int i = 0; i < 4; i++) memset(c[i], 0, sizeof(c[i])); for(int i = 0; (t = getchar()) != '<'; i++) printf("%c", t); for(int i = 0; (t = getchar()) != '>'; i++) { printf("%c", t); c[0][i] = t; } for(int i = 0; (t = getchar()) != '<'; i++) { printf("%c", t); c[1][i] = t; } for(int i = 0; (t = getchar()) != '>'; i++) { printf("%c", t); c[2][i] = t; } for(int i = 0; (t = getchar()) != '\n'; i++) { printf("%c", t); c[3][i] = t; } printf("\n"); for(int i = 0;(t = getchar()) != '.'; i++) printf("%c", t); for(;(t = getchar()) != '\n';) ; printf("%s%s%s%s\n", c[2], c[1], c[0], c[3]); }return 0;}
0 0
- UVA 10361-Automatic Poetry
- uva 10361 Automatic Poetry
- UVa 10361 - Automatic Poetry
- uva 10361 Automatic Poetry
- UVa 10361 - Automatic Poetry
- UVa 10361 - Automatic Poetry
- uva-10361-Automatic Poetry
- UVA 10361Automatic Poetry
- UVA 10361 - Automatic Poetry
- UVa 10361 - Automatic Poetry
- UVA 10361 Automatic Poetry
- UVa 10361: Automatic Poetry
- UVA 10361 Automatic Poetry
- uva 10361 - Automatic Poetry
- UVa - 10361 - Automatic Poetry
- UVA 10361 Automatic Poetry
- UVa 10361 Automatic Poetry
- uva 10361 Automatic Poetry
- jedis学习笔记【1】
- 几个相关系数:Pearson、Spearman、pointbiserialr、kendalltau
- xml文件的报错Failed to read schema document
- Apache Flink:详细入门
- 纯代码实现UITableViewCell的自定义扩展
- UVA 10361-Automatic Poetry
- Eclipse中运行MapReduce程序控制台无调试信息-log4j
- ASIO网络库-Server
- EL-表达式语言
- 删除修改Linux系统下history记录的方法
- 设计模式之解释器模式
- C语言_指向结构体的指针_plusC14.4
- 自定义推送显示按钮
- [Database] SARG(Searchable Arguments操作