题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4690

  纯沙茶模拟题。。。

 //STATUS:C++_AC_93MS_228KB
#include <functional>
#include <algorithm>
#include <iostream>
//#include <ext/rope>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <numeric>
#include <cstring>
#include <cassert>
#include <cstdio>
#include <string>
#include <vector>
#include <bitset>
#include <queue>
#include <stack>
#include <cmath>
#include <ctime>
#include <list>
#include <set>
#include <map>
using namespace std;
//#pragma comment(linker,"/STACK:102400000,102400000")
//using namespace __gnu_cxx;
//define
#define pii pair<int,int>
#define mem(a,b) memset(a,b,sizeof(a))
#define lson l,mid,rt<<1
#define rson mid+1,r,rt<<1|1
#define PI acos(-1.0)
//typedef
typedef __int64 LL;
typedef unsigned __int64 ULL;
//const
const int N=;
const int INF=0x3f3f3f3f;
const int MOD=,STA=;
const LL LNF=1LL<<;
const double EPS=1e-;
const double OO=1e15;
const int dx[]={-,,,};
const int dy[]={,,,-};
const int day[]={,,,,,,,,,,,,};
//Daily Use ...
inline int sign(double x){return (x>EPS)-(x<-EPS);}
template<class T> T gcd(T a,T b){return b?gcd(b,a%b):a;}
template<class T> T lcm(T a,T b){return a/gcd(a,b)*b;}
template<class T> inline T lcm(T a,T b,T d){return a/d*b;}
template<class T> inline T Min(T a,T b){return a<b?a:b;}
template<class T> inline T Max(T a,T b){return a>b?a:b;}
template<class T> inline T Min(T a,T b,T c){return min(min(a, b),c);}
template<class T> inline T Max(T a,T b,T c){return max(max(a, b),c);}
template<class T> inline T Min(T a,T b,T c,T d){return min(min(a, b),min(c,d));}
template<class T> inline T Max(T a,T b,T c,T d){return max(max(a, b),max(c,d));}
//End int hs[N][N]={
{,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,},
}; char ma[]="0123456789ABCDEF"; inline int getnum(char c)
{
return c<=''?c-'':c-'A'+;
} int main(){
// freopen("in.txt","r",stdin);
// freopen("out.txt","w",stdout);
int i,j,x,y;
char c1,c2;
while((c1=getchar())!='\n')
{
c2=getchar();
x=getnum(c1);
y=getnum(c2);
printf("%c%c",ma[hs[x][y]/],ma[hs[x][y]%]);
}
putchar('\n');
return ;
} /*
NUL SOH STX ETX . HT . DEL . . . VT FF CR SO SI
DLE DC1 DC2 DC3 . . BS . CAN EM . . IFS IGS IRS IUSITB
. . . . . LF ETB ESC . . . . . ENQ ACK BEL
. . SYN . . . . EOT . . . . DC4 NAK . SUB
SP . . . . . . . . . . . < ( + |
& . . . . . . . . . ! $ * ) ; .
- / . . . . . . . . . , % _ > ?
. . . . . . . . . ` : # @ ' = "
. a b c d e f g h i . . . . . .
. j k l m n o p q r . . . . . .
. ~ s t u v w x y z . . . . . .
^ . . . . . . . . . [ ] . . . .
{ A B C D E F G H I . . . . . .
} J K L M N O P Q R . . . . . .
\ . S T U V W X Y Z . . . . . .
0 1 2 3 4 5 6 7 8 9 . . . . . . NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR SO SI
DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC IFS IGS IRS IUSITB
SP ! " # $ % & ' ( ) * + , - . /
0 1 2 3 4 5 6 7 8 9 : ; < = > ?
@ A B C D E F G H I J K L M N O
P Q R S T U V W X Y Z [ \ ] ^ _
` a b c d e f g h i j k l m n o
p q r s t u v w x y z { | } ~ DEL for(i=0;i<16;i++){
for(j=0;j<16;j++)
scanf("%s",E[i][j]);
}
for(i=0;i<8;i++){
for(j=0;j<16;j++)
scanf("%s",A[i][j]);
}
mem(hs,0);
for(i=0;i<16;i++){
for(j=0;j<16;j++){
if(!strcmp(E[i][j],".") && (i!=4 || j!=11))continue;
for(int p=0;p<8;p++){
for(int q=0;q<16;q++)
if(!strcmp(E[i][j],A[p][q])){
hs[i][j]=p*16+q;
}
}
}
}
for(i=0;i<16;i++){
printf("{%d",hs[i][0]);
for(j=1;j<16;j++){
printf(",%d",hs[i][j]);
}
printf("},\n");
}
*/

HDU-4690 EBCDIC 映射,模拟,沙茶的更多相关文章

  1. HDU 4690 EBCDIC 2013 Multi-University Training Contest 9

    解题报告:一个模拟题,有两张表格,然后输入一个字符在第一章表格中的位置,让你找出这个字符在第二章表对应的位置. 我欧诺个的是暴力打表,输了两百多个数字,时间复杂度直接降到O(1),这题觉得比较坑的就是 ...

  2. HDU 4690 EBCDIC (2013多校 1005题 胡搞题)

    EBCDIC Time Limit: 2000/2000 MS (Java/Others)    Memory Limit: 102400/102400 K (Java/Others)Total Su ...

  3. hdu 4690 EBCDIC

    还有什么好说的呢?打表题= = #include<cstdio> #include<cstring> #include<algorithm> #include< ...

  4. 【沙茶了+筛选保存最大质因数】【HDU2136】Largest prime factor

    Largest prime factor Time Limit: 5000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Oth ...

  5. HDU 5510---Bazinga(指针模拟)

    题目链接 http://acm.hdu.edu.cn/search.php?action=listproblem Problem Description Ladies and gentlemen, p ...

  6. HDU 5047 Sawtooth(大数模拟)上海赛区网赛1006

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5047 解题报告:问一个“M”型可以把一个矩形的平面最多分割成多少块. 输入是有n个“M",现 ...

  7. HDU 4041 Eliminate Witches! --模拟

    题意: 给一个字符串,表示一颗树,要求你把它整理出来,节点从1开始编号,还要输出树边. 解法: 模拟即可.因为由括号,所以可以递归地求,用map存对应关系,np存ind->name的映射,每进入 ...

  8. HDU 5965 扫雷 【模拟】 (2016年中国大学生程序设计竞赛(合肥))

    扫雷 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submissi ...

  9. HDU 5935 Car 【模拟】 (2016年中国大学生程序设计竞赛(杭州))

    Car Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submiss ...

随机推荐

  1. docker 通过commit方法创建镜像(Tomcat+Java+Scala)

    前一阵试了试写Dockerfile创建docker image,但有时全靠Dockerfile写实在有些难度,退而求其次试一试使用commit来创建镜像: 想了想干脆创建一个Java+Scala+To ...

  2. ubuntu 和 win7 远程登陆 + vnc登陆

    ubuntu 和 win7 远程登陆: 第一种(通过win7自带的远程桌面来连接ubuntu) 1. windows7配置 我的电脑->属性->远程设置.-----允许远程连接 2. ub ...

  3. POJ3283+字典树

    简单的字典树 /* 字典树 构造字典树.注意初始化! */ #include<stdio.h> #include<string.h> #include<stdlib.h& ...

  4. 【BZOJ 1038】 1038: [ZJOI2008]瞭望塔

    1038: [ZJOI2008]瞭望塔 Description 致力于建设全国示范和谐小村庄的H村村长dadzhi,决定在村中建立一个瞭望塔,以此加强村中的治安.我们将H村抽象为一维的轮廓.如下图所示 ...

  5. Source Insight 安装使用

    习惯了在source insight下编辑阅读源码,在linux下用vi总是用不好 ,还是在Ubuntu上用回熟悉的source insight. 在Ubuntu中,安装Windows程序用wine, ...

  6. DSPLIB for C6455+CCSv3.3

    问题描述: Hello everybody, I was looking for DSPLIB libraries optimized for C6455 processors. I found th ...

  7. C 可变参数(C与指针实例)

    偶尔我们需要设计一些函数,它们的参数数目不是固定的,这样我们需要用到可变参数列表. 可变参数列表是通过宏来实现的,定义于stdarg.h头文件. 具体内容在<C与指针> ;         ...

  8. java开发之IO流

    一直对IO流记不清楚,从别的地方转过来. 看下图: 流的概念和作用 学习Java IO,不得不提到的就是JavaIO流. 流是一组有顺序的,有起点和终点的字节集合,是对数据传输的总称或抽象.即数据在两 ...

  9. Windows使用virtualenv搭建flask开发环境

    virtualenv: VirtualEnv用于在一台机器上创建多个独立的Python虚拟运行环境,多个Python环境相互独立,互不影响,它能够: 在没有权限的情况下安装新套件 不同应用可以使用不同 ...

  10. poj 3009 Curling 2.0( dfs )

    题目:http://poj.org/problem?id=3009 参考博客:http://www.cnblogs.com/LK1994/ #include <iostream> #inc ...