设为首页 加入收藏

TOP

POJ 2993 Emag eht htiw Em Pleh 模拟
2015-07-20 18:05:16 来源: 作者: 【 】 浏览:4
Tags:POJ 2993 Emag eht htiw Pleh 模拟

Emag eht htiw Em Pleh
Time Limit: 1000MS Memory Limit: 65536K
Total Submissions: 2661 Accepted: 1778

Description

This problem is a reverse case of the problem 2996. You are given the output of the problem H and your task is to find the corresponding input.

Input

according to output of problem 2996.

Output

according to input of problem 2996.

Sample Input

White: Ke1,Qd1,Ra1,Rh1,Bc1,Bf1,Nb1,a2,c2,d2,f2,g2,h2,a3,e4
Black: Ke8,Qd8,Ra8,Rh8,Bc8,Ng8,Nc6,a7,b7,c7,d7,e7,f7,h7,h6

Sample Output

+---+---+---+---+---+---+---+---+
|.r.|:::|.b.|:q:|.k.|:::|.n.|:r:|
+---+---+---+---+---+---+---+---+
|:p:|.p.|:p:|.p.|:p:|.p.|:::|.p.|
+---+---+---+---+---+---+---+---+
|...|:::|.n.|:::|...|:::|...|:p:|
+---+---+---+---+---+---+---+---+
|:::|...|:::|...|:::|...|:::|...|
+---+---+---+---+---+---+---+---+
|...|:::|...|:::|.P.|:::|...|:::|
+---+---+---+---+---+---+---+---+
|:P:|...|:::|...|:::|...|:::|...|
+---+---+---+---+---+---+---+---+
|.P.|:::|.P.|:P:|...|:P:|.P.|:P:|
+---+---+---+---+---+---+---+---+
|:R:|.N.|:B:|.Q.|:K:|.B.|:::|.R.|
+---+---+---+---+---+---+---+---+



#include
  
   
using namespace std;

char str[10][35],ch[]="KQRBN";
char a[34]="|...|:::|...|:::|...|:::|...|:::|";
char b[34]="|:::|...|:::|...|:::|...|:::|...|";

int main()
{
	int i,j;
	memset(str,0,sizeof(str));
	for(i=1;i<=8;i++)
	{
		if(i%2)
			strcpy(str[i],a);
		else
			strcpy(str[i],b);
	}

	char c[150],d[10];;
	int k=2;
	while(k--)
	{
		memset(c,0,sizeof(c));
		scanf("%s%s",d,c);
	
		if(d[0]=='W')
		{
			for(i=0;i
   
    ='a' && c[i]<='z') && (c[i-1]<'A' || c[i-1]>'Z')) { int x=c[i]-'a'+1; int y=c[i+1]-'0'; str[9-y][4*x-2]='P'; } } } } else { for(i=0;i
    
     ='a' && c[i]<='z') && (c[i-1]<'A' || c[i-1]>'Z')) { int x=c[i]-'a'+1; int y=c[i+1]-'0'; str[9-y][4*x-2]='p'; } } } } } for(i=1;i<=8;i++) { cout<<"+---+---+---+---+---+---+---+---+\n"; cout<
     
      

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇UVA 11551 - Experienced Endeavo.. 下一篇hdu1068 Girls and Boys --- 最大..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: