HDU 4690 EBCDIC (2013多校 1005题 胡搞题)
EBCDIC
Time Limit: 2000/2000 MS (Java/Others) Memory Limit: 102400/102400 K (Java/Others)
Total Submission(s): 160 Accepted Submission(s): 81
Here is the EBCDIC table.
Here is the ASCII table.
E.html download 方便图中文字复制
http://pan.baidu.com/share/link?shareid=453447595&uk=352484775
这题胡搞就行了。
把上面的和下面的表都复制下来。 注意上面的空的要找个东西代替。
在记事本下很容易修改了。查找替换啥的,再手动修改下格式
/* ***********************************************
Author :kuangbin
Created Time :2013/8/20 13:11:33
File Name :F:\2013ACM练习\2013多校9\1005.cpp
************************************************ */ #include <stdio.h>
#include <string.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <string>
#include <math.h>
#include <stdlib.h>
#include <time.h>
using namespace std;
string str[] =
{
"NUL","SOH","STX","ETX","XXXXXXX","HT","XXXXXXX","DEL","XXXXXXX","XXXXXXX","XXXXXXX","VT","FF","CR","SO","SI",
"DLE","DC1","DC2","DC3","XXXXXXX","XXXXXXX","BS","XXXXXXX","CAN","EM","XXXXXXX","XXXXXXX","IFS","IGS","IRS","IUS ITB",
"XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","LF","ETB","ESC","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","ENQ","ACK","BEL",
"XXXXXXX","XXXXXXX","SYN","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","EOT","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","DC4","NAK","XXXXXXX","SUB",
"SP","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX",".","<","(","+","|",
"&","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","!","$","*",")",";","XXXXXXX",
"-","/","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX",",","%","_",">","?",
"XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","`",":","#","@","\'","=","\"",
"XXXXXXX","a","b","c","d","e","f","g","h","i","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX",
"XXXXXXX","j","k","l","m","n","o","p","q","r","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX",
"XXXXXXX","~","s","t","u","v","w","x","y","z","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX",
"^","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","[","]","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX",
"{","A","B","C","D","E","F","G","H","I","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX",
"}","J","K","L","M","N","O","P","Q","R","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX",
"\\","XXXXXXX","S","T","U","V","W","X","Y","Z","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX",
"","","","","","","","","","","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX"
};
string str2[]=
{
"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","IUS ITB",
"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","{","|","}","~","DEL"
};
char s[];
int change(char ch)
{
if(ch <='')return ch-'';
else return ch-'A'+;
}
int main()
{
//freopen("in.txt","r",stdin);
//freopen("out.txt","w",stdout);
while(scanf("%s",s)==)
{
int n = strlen(s);
for(int i = ;i < n;i+=)
{
int p = change(s[i])* + change(s[i+]);
int t = ;
while(t < && str2[t] != str[p])t++;
printf("%02X",t);
}
printf("\n");
}
return ;
}
HDU 4690 EBCDIC (2013多校 1005题 胡搞题)的更多相关文章
- HDU 4690 EBCDIC 2013 Multi-University Training Contest 9
解题报告:一个模拟题,有两张表格,然后输入一个字符在第一章表格中的位置,让你找出这个字符在第二章表对应的位置. 我欧诺个的是暴力打表,输了两百多个数字,时间复杂度直接降到O(1),这题觉得比较坑的就是 ...
- hdu 5308 (2015多校第二场第9题)脑洞模拟题,无语
题目链接:http://acm.hdu.edu.cn/listproblem.php?vol=44 题意:给你n个n,如果能在n-1次运算之后(加减乘除)结果为24的输出n-1次运算的过程,如果不能输 ...
- HDU 4793 Collision(2013长沙区域赛现场赛C题)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4793 解题报告:在一个平面上有一个圆形medal,半径为Rm,圆心为(0,0),同时有一个圆形范围圆心 ...
- hdu 4690 EBCDIC
还有什么好说的呢?打表题= = #include<cstdio> #include<cstring> #include<algorithm> #include< ...
- HDU/杭电2013多校第三场解题报告
今天悲剧了,各种被虐啊,还是太年轻了 Crime 这道题目给的时间好长,第一次就想到了暴力,结果华丽丽的TLE了. 后来找了一下,发现前24个是1, 2, 6, 12, 72, 72, 864, 17 ...
- hdu 5301 Buildings (2015多校第二场第2题) 简单模拟
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5301 题意:给你一个n*m的矩形,可以分成n*m个1*1的小矩形,再给你一个坐标(x,y),表示黑格子 ...
- HDU 4704 Sum (2013多校10,1009题)
Sum Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submi ...
- HDU 4699 Editor (2013多校10,1004题)
Editor Time Limit: 3000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Su ...
- HDU 4681 String(2013多校8 1006题 DP)
String Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Subm ...
随机推荐
- Petrozavodsk Summer Training Camp 2017
Petrozavodsk Summer Training Camp 2017 Problem A. Connectivity 题目描述:有\(n\)个点,现不断地加边.每条边有一种颜色,如果一个点对\ ...
- Spring之IOC,DI,动态代理,反射
Spring框架是J2EE开发中一个使用广泛的框架,它使得dao和service层的维护更加便利.Spring框架有两个重要的特征,一个是IOC,另一个是AOP.我们在这里主要介绍IOC,以及IOC中 ...
- 20165301 预备作业三:Linux安装及命令入门
预备作业三:Linux安装及命令入门 VirtualBox虚拟机的安装 在进行安装之前,原本以为有了娄老师的安装教程会是一件很容易的事情.万万没想到,在自己实际动手操作中,还是遇到了许多困难.通过与同 ...
- chrome浏览器使用HTML5预览图片
chrome浏览器对HTML5支持的较好,使用HTML5的File相关的api,可以实现前台页面在选定图片后,不上传即可预览.代码如下: 1.前台代码,使用<input type="f ...
- Vugen 和controller 中的run-time setting区别
Vugen 和controller 中的run-time setting有什么不同?
- oracle创建计划任务
特别提示: oracle是执行完任务,才按照interval去计算下次执行时间!!! 为精确每个5分钟执行一个任务,必须自己计算时间. 如:trunc_minute(sysdate)+/ create ...
- Java 中(静态)变量、(静态)代码块的执行顺序
Java 中(静态)变量.(静态)代码块的执行顺序 非原创 本文讨论 Java 中(静态)变量.(静态)代码块的执行顺序 首先创建 3 个类 1.Foo 类 public class Foo { pu ...
- 第一个ajax小demo
第一个ajax小demo 文章来源:http://blog.csdn.net/magi1201/article/details/44569657
- javascript函数笔记
函数是一个具有特定功能的语句块.函数的定义使用关键字 function,语法如下: function funcName ([parameters]){ statements; [return表达式;] ...
- hdu 1114 dp动规 Piggy-Bank
Piggy-Bank Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit S ...