link:http://acm.hdu.edu.cn/showproblem.php?pid=4690

考的是耐心何细心啊,用map把两个表格映射一下就行~

 #include <iostream>
 #include <cstdio>
 #include <cstdlib>
 #include <cstring>
 #include <cmath>
 #include <cctype>
 #include <algorithm>
 #include <queue>
 #include <deque>
 #include <queue>
 #include <list>
 #include <map>
 #include <set>
 #include <vector>
 #include <utility>
 #include <functional>
 #include <fstream>
 #include <iomanip>
 #include <sstream>
 #include <numeric>
 #include <cassert>
 #include <ctime>
 #include <iterator>
 const int INF = 0x3f3f3f3f;
 ][] = {{-,},{,},{,-},{,},{-,-},{-,},{,-},{,}};
 using namespace std;
 ][] = {
     "NUL","SOH","STX","ETX","","HT","","DEL","","","","VT","FF","CR","SO","SI",
     "DLE","DC1","DC2","DC3","","","BS","","CAN","EM","","","IFS","IGS","IRS","IUS ITB",
     "","","","","","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","","","","","","",
     ","","","","","",""
 };
 ][] = {
 "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"
 };
 map<pair<int,int>, pair<int,int> > coll;
 int main(void)
 {
     #ifndef ONLINE_JUDGE
     freopen("in.txt", "r", stdin );
     #endif // ONLINE_JUDGE
     string sad;
     ios::sync_with_stdio(false);
     cin>>sad; coll.clear();
     string tmp; pair<int,int> so, to;
     ; i < ; ++i)
     {
         ; j < ; ++j)
         {
             if (A[i][j]!="")
             {
                 so.first=i, so.second=j;
                 bool mrk = false;
                 ; k < ; ++k)
                 {
                     ; h < ; ++h)
                     {
                         if (A[i][j]==B[k][h])
                         {
                             mrk = true;
                             to.first=k,to.second=h;
                             coll[so] = to; break;
                         }
                     }
                     if (mrk) break;
                 }
             }
         }
     }
     ; i < sad.size(); i+=)
     {
         int X, Y; tmp.clear();
         ;
         ';
         ]>=]<=]- ;
         ] - ';
         pair<int,int> hehe, TM;
         hehe.first = X, hehe.second = Y;
         TM = coll[hehe];
         int j = TM.first, k = TM.second;
         char XX, YY;
         XX = j+ ';
         ) YY = k -  + 'A';
         ';
         printf("%c%c", XX, YY);
     }
     printf("\n");

     ;
 }

写那两个数组没有vim的帮助手是不是得残了……

还有一个就是,当你发现程序某一小段怎么都不对的时候,也许重新写一下就OK了,调试了很久……

走吧,小胖!

hdu4690 EBCDIC ——水题,考耐心的更多相关文章

  1. 【转】POJ百道水题列表

    以下是poj百道水题,新手可以考虑从这里刷起 搜索1002 Fire Net1004 Anagrams by Stack1005 Jugs1008 Gnome Tetravex1091 Knight ...

  2. HDOJ 2317. Nasty Hacks 模拟水题

    Nasty Hacks Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Tota ...

  3. ACM :漫漫上学路 -DP -水题

    CSU 1772 漫漫上学路 Time Limit: 1000MS   Memory Limit: 131072KB   64bit IO Format: %lld & %llu Submit ...

  4. ytu 1050:写一个函数,使给定的一个二维数组(3×3)转置,即行列互换(水题)

    1050: 写一个函数,使给定的一个二维数组(3×3)转置,即行列互换 Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 154  Solved: 112[ ...

  5. [poj2247] Humble Numbers (DP水题)

    DP 水题 Description A number whose only prime factors are 2,3,5 or 7 is called a humble number. The se ...

  6. gdutcode 1195: 相信我这是水题 GDUT中有个风云人物pigofzhou,是冰点奇迹队的主代码手,

    1195: 相信我这是水题 Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 821  Solved: 219 Description GDUT中有个风云人 ...

  7. BZOJ 1303 CQOI2009 中位数图 水题

    1303: [CQOI2009]中位数图 Time Limit: 1 Sec  Memory Limit: 162 MBSubmit: 2340  Solved: 1464[Submit][Statu ...

  8. 第十一届“蓝狐网络杯”湖南省大学生计算机程序设计竞赛 B - 大还是小? 字符串水题

    B - 大还是小? Time Limit:5000MS     Memory Limit:65535KB     64bit IO Format: Description 输入两个实数,判断第一个数大 ...

  9. ACM水题

    ACM小白...非常费劲儿的学习中,我觉得目前我能做出来的都可以划分在水题的范围中...不断做,不断总结,随时更新 POJ: 1004 Financial Management 求平均值 杭电OJ: ...

随机推荐

  1. zookeeper第二课 客户端的简单命令

    zookeeper的每个节点既可以是目录也可以是文件,节点上只存一些协调数据(状态.配置.位置),单位一般是KB,大部分数据用sdfs上 只有持久化的节点才可以有子节点,临时节点不可以有自子节点. 客 ...

  2. Java开发高薪之路__大纲篇

    本人小白,现对java开发做出以下总结,内容将从初级开始,逐步完善与摸索. 基础篇 网页篇 Android篇 高级建设篇 数据篇 系统篇

  3. linux下打包命令的使用

    Unix系统业务使用(特别是数据管理与备份)中,经过一番研究.整理后,充分利用Unix系统本身的命令tar.cpio和compress等来做到打包和压缩,使之充当类似DOS下的压缩软件,同时在Unix ...

  4. 创建JOB

    1.创建一张表g_test create table G_TEST ( ID NUMBER(12), C_DATE DATE ) 2.创建一个sequence create sequence G_SE ...

  5. Mac 搭建 SVN 服务器环境

    Mac 搭建 SVN 服务器环境 一.创建svn repository svnadmin create /path/svn/pro //仓库位置,svn是svn的目录,pro是一个版本库的目录 PS: ...

  6. Mac OSX 无法SSH远程的原因

    在mac中开启了远程共享,拿windows上的putty 死活无法ssh上去. 后来下载了个新版的putty, 连上了.

  7. 通过ksoap2-android来调用Web Service操作的实例

    import java.io.IOException; import org.ksoap2.SoapEnvelope;import org.ksoap2.serialization.SoapObjec ...

  8. 【代码】verilog之:按键消抖

    此模块完美运行 /*-------------------------------------------------------------------------------------- -- ...

  9. McAfee重返科技业 研制D-Central防政府监视

    新闻链接:http://tech.qq.com/a/20131008/016127.htm 新闻时间: 10月8日编译 新闻正文:McAfee重返科技业 研制D-Central防政府监视 约翰·迈克菲 ...

  10. JavaScript 语句

    JavaScript 语句 JavaScript 语句向浏览器发出的命令.语句的作用是告诉浏览器该做什么. JavaScript 语句 JavaScript 语句是发给浏览器的命令. 这些命令的作用是 ...