uva10361--String
来源:互联网 发布:传智播客java视频 编辑:程序博客网 时间:2024/06/08 11:37
字符串类型的水题
//#define LOCAL#include <stdio.h>#include <string.h>#define MAXN 100 + 10char s1[MAXN], s2[MAXN], s3[MAXN], s4[MAXN], s5[MAXN];char buf[MAXN]; int main(){#ifdef LOCALfreopen("input.txt", "r", stdin);//freopen("output.txt", "w", stdout);#endifint cases;char c;int i, j;scanf("%d", &cases);c = getchar();// 消除数字后面的回车while(cases--){// 数据初始化memset(s1, 0, sizeof(s1));memset(s2, 0, sizeof(s2)); memset(s3, 0, sizeof(s3)); memset(s4, 0, sizeof(s4)); memset(s5, 0, sizeof(s5)); memset(buf, 0, sizeof(buf));// 数据输入 // 输入s1 c = getchar(); for(i = 0;c != '<';i++) { s1[i] = c; c = getchar(); } // 输入s2 c = getchar();for(i = 0;c != '>';i++) { s2[i] = c; c = getchar(); } // 输入s3 c = getchar(); for(i = 0;c != '<';i++) { s3[i] = c; c = getchar(); } // 输入s4 c = getchar();for(i = 0; c != '>';i++) { s4[i] = c; c = getchar(); } // 输入s5 c = getchar();for(i = 0; c != '\n';i++) { s5[i] = c; c = getchar(); } // 输入buf c = getchar();for(i = 0; c != '.';i++) { buf[i] = c; c = getchar(); } c = getchar(); c = getchar();c = getchar(); // 消除两个点和一个换行 // 数据输出printf("%s%s%s%s%s\n", s1, s2, s3, s4, s5);printf("%s%s%s%s%s\n", buf, s4, s3, s2, s5); }return 0;}
- uva10361--String
- uva10361(字符串)
- ACM-uva10361
- UVA10361 字符串
- uva10361 - Automatic Poetry
- UVA10361- Automatic Poetry
- UVa10361 Automatic Poetry
- UVA10361 - Automatic Poetry
- uva10361 - Automatic Poetry
- UVA10361(字符串水题多坑)
- UVA10361 - Automatic Poetry
- UVa10361 - Automatic Poetry
- uva10361 Automatic Poetry
- UVA10361 - Automatic Poetry
- UVA10361 - Automatic Poetry
- UVa10361-Automatic Poetry-字符串-难度1
- uva10361 Automatic Poetry(getline 的用法)
- UVA10361转化思想使代码更加简洁
- Session的基本操作
- 本机与虚拟机可ping通但无法SSH连接
- linux 文件权限 与 查找
- C++ 中的static
- 将一幅图像转换为灰度图
- uva10361--String
- U-boot移植
- cdoframework系列介绍1:CDO对象说明
- Hibernate关联关系
- Ubuntu下构建内核源码树
- SQL SERVER
- 目标2——摸清目录结构功能
- hadoop学习笔记(2)-hadoop安装目录权限的问题导致datanode启动失败
- 多线程