uva 10361 Automatic Poetry
2013-06-16 17:28
323 查看
题目:10361 - Automatic Poetry
思路:水题。。暴力
View Code
思路:水题。。暴力
#include <cstdio> #include <iostream> #include <cstring> #include <algorithm> #include <cmath> using namespace std; char str[110]; string s[6]; int main() { int t; scanf("%d",&t); getchar(); while(t--) { gets(str); for(int i=0;i<=5;i++) s[i]=""; int l=strlen(str); int i=0; while(str[i]!='<') { s[0]+=str[i]; i++; } i++; while(str[i]!='>') { s[1]+=str[i]; i++; } i++; while(str[i]!='<') { s[2]+=str[i]; i++; } i++; while(str[i]!='>') { s[3]+=str[i]; i++; } i++; while(i<l) { s[4]+=str[i]; i++; } gets(str); i=0; while(1) { if(str[i]=='.'&&str[i+1]=='.'&&str[i+2]=='.') break; s[5]+=str[i]; i++; } for(int i=0;i<=4;i++) cout<<s[i]; cout<<endl; swap(s[1],s[3]); cout<<s[5]; for(int i=1;i<=4;i++) cout<<s[i]; cout<<endl; } return 0; }
View Code
相关文章推荐
- UVA10361 - Automatic Poetry
- UVA10361 - Automatic Poetry
- UVA 10361 - Automatic Poetry(字符串)
- UVA 10361 Automatic Poetry
- UVA 10361-Automatic Poetry
- UVa 10361 - Automatic Poetry
- UVa 10361 Automatic Poetry (字符串处理&两种读入方式)
- UVA 10361 解题报告
- UVA 10361-Automatic Poetry(模拟)
- uva10361 Automatic Poetry(getline 的用法)
- UVA - 10361 Automatic Poetry
- UVA 10361 Automatic Poetry
- uva10361--String
- uva-10361-Automatic Poetry
- UVa-10361 Automatic Poetry
- UVA 10361 (13.08.01)
- uva 10361
- Volume 1. Elementary Problem Solving :: String Uva 401,10010,10361,537,409
- UVa-10361-Automatic Poetry
- UVa 10361 自动作诗机