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

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<cstdio>
#include <cstring>
using namespace std;
char maz[17][34];
int mp[255];
char cell[2][3][6]={
{
"+---+",
"|:::|",
"+---+",
},
{
"+---+",
"|...|",
"+---+",
}
};
void dye(int x,int y){
for(int i=0;i<3;i++){
for(int j=0;j<5;j++){
maz[2*x+i][4*y+j]=cell[(x+y)&1][i][j];
}
}
}
void clearchess(){
memset(maz,0,sizeof(maz));
for(int i=0;i<8;i++){
for(int j=0;j<8;j++){
dye(i,j);
}
}
}
char buff[1024];
void subinsrt(int x,int y,char ch){
x--;
maz[2*x+1][4*y+2]=ch;
}
void insrt(bool upc){
int len=strlen(buff);
char use;
for(int i=0;i<len;){
int j;
for( j=i;j<len&&buff[j]!=',';j++){}
if(j-i==3)use=buff[i];
else use='P';
if(upc)subinsrt(buff[j-1]-'0',mp[buff[j-2]],use);
else subinsrt(buff[j-1]-'0',mp[buff[j-2]],use-'A'+'a');
i=j+1;
// for(int i=0;i<17;i++)puts(maz[i]);
}
}
int main(){
for(int i=0;i<26;i++)mp[i+'a']=i;
clearchess();
scanf("%s",buff);
scanf("%s",buff);
insrt(true);
scanf("%s",buff);
scanf("%s",buff);
insrt(false);
for(int i=16;i>=0;i--)puts(maz[i]);
return 0;
}

  

快速切题 poj 2993 Emag eht htiw Em Pleh 模拟 难度:0的更多相关文章

  1. 模拟 POJ 2993 Emag eht htiw Em Pleh

    题目地址:http://poj.org/problem?id=2993 /* 题意:与POJ2996完全相反 模拟题 + 字符串处理:无算法,读入两行字符串找出相应点用used标记,输出时标记过的输出 ...

  2. Poj 2993 Emag eht htiw Em Pleh

    1.Link: http://poj.org/problem?id=2993 2.Content: Emag eht htiw Em Pleh Time Limit: 1000MS   Memory ...

  3. POJ 2993 Emag eht htiw Em Pleh【模拟画棋盘】

    链接: http://poj.org/problem?id=2993 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=27454#probl ...

  4. poj 2993 Emag eht htiw Em Pleh(模拟)

    题目:http://poj.org/problem?id=2993 题意:和2996反着 #include <iostream> #include<cstdio> #inclu ...

  5. POJ 2993:Emag eht htiw Em Pleh

    Emag eht htiw Em Pleh Time Limit: 1000MS   Memory Limit: 65536KB   64bit IO Format: %I64d & %I64 ...

  6. Emag eht htiw Em Pleh 分类: POJ 2015-06-29 18:54 10人阅读 评论(0) 收藏

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

  7. Emag eht htiw Em Pleh

    Emag eht htiw Em Pleh This problem is a reverse case of the problem 2996. You are given the output o ...

  8. Emag eht htiw Em Pleh(imitate)

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

  9. POJ2993——Emag eht htiw Em Pleh(字符串处理+排序)

    Emag eht htiw Em Pleh DescriptionThis problem is a reverse case of the problem 2996. You are given t ...

随机推荐

  1. inotify+rsync安装配置

    环境 系统 IP地址 主服务器 CentOS7.4 192.168.1.1 备份服务器 CentOS7.4 192.168.1.2 一.备份服务器 安装rsync(备) wget https://rs ...

  2. Nginx高级玩法

    1. Nginx获取自定义消息头 .nginx是支持读取非nginx标准的用户自定义header的,但是需要在http或者server下开启header的下划线支持: underscores_in_h ...

  3. Python开发【笔记】: __get__和__getattr__和__getattribute__区别

    引言: 1.object.__getattr__(self, name) 当一般位置找不到attribute的时候,会调用getattr,返回一个值或AttributeError异常. 2.objec ...

  4. nodejs Async详解之三:集合操作

    Async提供了很多针对集合的函数,可以简化我们对集合进行异步操作时的步骤.如下: forEach:对集合中每个元素进行异步操作 map:对集合中的每个元素通过异步操作得到另一个值,得到新的集合 fi ...

  5. 【转】Deep Learning(深度学习)学习笔记整理系列之(八)

    十.总结与展望 1)Deep learning总结 深度学习是关于自动学习要建模的数据的潜在(隐含)分布的多层(复杂)表达的算法.换句话来说,深度学习算法自动的提取分类需要的低层次或者高层次特征. 高 ...

  6. soapUI-DataSource

    1.1.1.1 概述 - 数据源   Option Description   Properties DataSource属性表   Toolbar DataSource工具栏   Configura ...

  7. 数据挖掘-KNN-K最近邻算法

    1. 算法核心思想: 通过计算每个训练样本到待分类样本的距离,选取和待分类样本的距离最近的 K 个训练样本,K个样本中那个类别的训练样本占据着多数, 则表明待分类的样本就属于哪一个类别. KNN算法在 ...

  8. Linux系统——FTP

    FTP连接及传输模式1. 控制连接:TCP21,用于发送FTP命令信息2. 数据连接:TCP20,用于上传.下载数据3. 数据连接的建立类型:(1)主动模式:服务器制动发起数据连接首先由客户端向服务端 ...

  9. macbook 蓝牙关闭按钮灰色的

    PRAM重置:1.关机,拔掉所有外设,只连接电源线2.按开机键,接着马上同时按住 command+option+p+r 键,按住后听到三次dang的开机音后放开3.电脑会自行启动,进到登录页面后点关机 ...

  10. hdu5110 dp

    题意 给 了 一 个 矩 阵 然 后 , 潜 艇 可 以 向 前 在 西北和东北之间 的区域, 然后每个潜艇有一个值D ,当到达潜艇距离为D的倍数的时候可以得到这个价值,这样我们1000*1000 的 ...