10361 - Automatic Poetry
来源:互联网 发布:产品进入淘宝首页 编辑:程序博客网 时间:2024/06/09 15:04
#include<stdio.h>
#include<string.h>
#define MAXN100+10
chars1[MAXN],s2[MAXN];
intmain()
{
inti,j,n,b_i,bracket[4];
scanf("%d",&n);
getchar();
for(i=0;i<n;i++)
{
b_i=0;
fgets(s1,MAXN,stdin);
fgets(s2,MAXN,stdin);
for(j=0;j<strlen(s1);j++)
if(s1[j]!='<'&&s1[j]!='>')
printf("%c",s1[j]);
else
{
bracket[b_i]=j;
b_i++;
}
for(j=0;j<strlen(s2);j++)
if(s2[j]!='.')printf("%c",s2[j]);
elsebreak;
for(j=bracket[2]+1;j<bracket[3];j++)
printf("%c",s1[j]);
for(j=bracket[1]+1;j<bracket[2];j++)
printf("%c",s1[j]);
for(j=bracket[0]+1;j<bracket[1];j++)
printf("%c",s1[j]);
for(j=bracket[3]+1;j<strlen(s1);j++)
printf("%c",s1[j]);
}
return0;
}
uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=96&page=show_problem&problem=1302
0 0
- 10361--Automatic Poetry
- 10361 - Automatic Poetry
- 10361 - Automatic Poetry
- uva 10361 Automatic Poetry
- UVa 10361 - Automatic Poetry
- uva 10361 Automatic Poetry
- 10361 - Automatic Poetry
- UvaOJ 10361 - Automatic Poetry
- UVa 10361 - Automatic Poetry
- UVa 10361 - Automatic Poetry
- uva-10361-Automatic Poetry
- 10361 - Automatic Poetry
- UVA 10361Automatic Poetry
- 10361 - Automatic Poetry
- UVaOJ 10361 - Automatic Poetry
- UVA 10361 - Automatic Poetry
- UVa 10361 - Automatic Poetry
- 10361 - Automatic Poetry
- C# ASP.NET GridView导出EXCEL。
- Linux Input子系统--设备的注册和打开
- 457 - Linear Cellular Automata
- 401 - Palindromes
- 10010 - Where's Waldorf?
- 10361 - Automatic Poetry
- 《jQuery基础教程》4th 笔记- 选择元素
- 537 - Artificial Intelligence?
- 409 - Excuses, Excuses!
- 10878 - Decode the tape
- 10815 - Andy's First Dictionary
- 644 - Immediate Decodability
- 10115 - Automatic Editing
- unity3d物理赛车系统