Emag eht htiw Em Pleh

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
大家可以去poj 看看原题
这提题是逆序输出
 #include<cstdio>
#include<cstring>
#include<iostream>
#include<cstdlib>
using namespace std;
char s[][];
void print(int t)
{
if(t) printf(".");
else printf(":");
}
int main()
{
int xi,yi,i,j,t;
char str[],ch,x,y;
for(i=; i<; i++)
for(j=; j<; j++)
{
if((i+j)%)
s[i][j]='.';
else s[i][j]=':';
}
for(i=; i<; i++)
{
scanf("%s",str);
if(strcmp(str,"White:")==)
{
while(scanf("%c",&ch)&&ch!='\n')
{
if('A'<=ch&&ch<='Z')
{
scanf("%c%c",&x,&y);
xi=x-'a'+;
yi=y-'';
s[yi][xi]=ch;
}
else if('a'<=ch&&ch<'i')
{
xi=ch-'a'+;
scanf("%c",&y);
yi=y-'';
s[yi][xi]='P';
}
}
}
else
{
while(scanf("%c",&ch)&&ch!='\n')
{
if('A'<=ch&&ch<='Z')
{
scanf("%c%c",&x,&y);
xi=x-'a'+;
yi=y-'';
s[yi][xi]=ch+;
}
else if('a'<=ch&&ch<'i')
{
xi=ch-'a'+;
scanf("%c",&y);
yi=y-'';
s[yi][xi]='p';
}
}
}
}
for(i=; i>; i--)
{
printf("+---+---+---+---+---+---+---+---+\n");
for(j=; j<; j++)
{
printf("|");
t=(i+j)%;
print(t);
printf("%c",s[i][j]);
print(t);
}
printf("|\n");
}
printf("+---+---+---+---+---+---+---+---+\n");
return ;
}

Emag eht htiw Em Pleh的更多相关文章

  1. Emag eht htiw Em Pleh(imitate)

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

  2. 模拟 POJ 2993 Emag eht htiw Em Pleh

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

  3. 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: ...

  4. 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 ...

  5. 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 ...

  6. 快速切题 poj 2993 Emag eht htiw Em Pleh 模拟 难度:0

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

  7. 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 ...

  8. 模拟 + 打表 --- Emag eht htiw Em Pleh

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

  9. POJ 2993:Emag eht htiw Em Pleh

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

随机推荐

  1. spring MVC 整合mongodb

    Spring Mongodb 目录 1 SPRING整合MONGODB 1 1.1 环境准备 1 1.2 包依赖 1 1.3 配置 2 2 案列 5 2.1 SPRING MVC整合MONGODB代码 ...

  2. 数据存储(一)--SharedPreferences之你不知道的事

    一.SharedPreferences将数据文件保存在指定路径上 SharedPreferences原则上是仅仅能保存在当前应用程序私有的shared_prefs文件夹中,只是也不是绝对的,我们能够用 ...

  3. spring servlet 扩展undertow

    官方地址:http://undertow.io/documentation/servlet/servlet-extensions.html  留待学习中,mark一下 源码地址:https://git ...

  4. [转] 整理了一份React-Native学习指南

    自己在学习React-Native过程中整理的一份学习指南,包含 教程.开源app和资源网站等,还在不断更新中.欢迎pull requests! React-Native学习指南 本指南汇集React ...

  5. Android开发--二维码开发应用(转载!)

    android项目开发 二维码扫描   基于android平台的二维码扫描项目,可以查看结果并且链接网址 工具/原料 zxing eclipse 方法/步骤   首先需要用到google提供的zxin ...

  6. Android开发---支付宝功能接口(支付功能)(转载!)

    最近在做一个关于购物商城的项目,项目里面付款这块我选的是调用支付宝的接口,因为用的人比较多. 在网上搜索了以下,有很多这方面的教程,但大部分教程过于陈旧,而且描述的过于简单.而且支付宝提供的接口一直在 ...

  7. SQL Server死锁日志各字段含义

    使用跟踪标记 1204 --打开跟踪标记 DBCC TRACEON (1204,-1) --关闭跟踪标记 DBCC TRACEOFF (1204,-1) 处于死锁状态时,跟踪标记 1204 在等待的线 ...

  8. 在企业级开发中使用Try...Catch...会影响效率吗?

    感谢神啊.上帝及老天爷让我失眠,才能够有了本篇文章. 记得不久之前,公司一同事曾经说过:“如果是Winform开发,由于程序是在本地,使用try...catch不会有太大性能问题,可是如果是在web服 ...

  9. Android Parcelable Trans byte[]

    思路: http://stackoverflow.com/questions/10898116/make-custom-parcelable-containing-byte-array 谢谢, 这位外 ...

  10. ASP.NET Excel数据导入数据库

    <identity impersonate="true"/> 是指模拟IIS身份验证 導入錯誤時可刪除 protected void btnImport_Click(o ...