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. Reapter合并行

    html文件: <asp:Repeater ID="rptEmployee" runat="server"> <HeaderTemplate& ...

  2. Spring 数据库配置用户名和密码加密

    单个数据库配置 : 一般spring容器启动时,通过PropertyPlaceholderConfigurer类读取jdbc.properties文件里的数据库配置信息.通过这个原理,我们把加密后的数 ...

  3. [Prodinner项目]学习分享_第二部分_Entity到DB表的映射

    1.单纯映射 基本语法为 modelBuilder.Entity<InsType>().ToTable("TB_InsType"); 2.一对多映射(表关系) 实体类B ...

  4. cordova环境搭建,搭建项目,以及拍照功能的实现

    一.配置环境 1.配置java环境: 下载对应系统环境的jdk:http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-13 ...

  5. 在eclipse中导入weka(小白在路上)

    第一步:新建一个java工程,new->javaproject,假设工程名为wekatest 第二步:导入weka.jar 第三步:src关联 导入后有许多的.class文件,直接双击打开是看不 ...

  6. python抓取数据 常见反爬虫 情况

    1.报文头信息: User-Agent Accept-Language  防盗链 上referer 随机生成不同的User-Agent构造报头 2.加抓取等待时间 每抓取一页都让它随机休息几秒,加入此 ...

  7. 导出Excel 有身份证时注意

    if (this.GridView1.Rows.Count != 0)            {                HttpContext.Current.Response.Clear() ...

  8. 把DataTable中的数据拼接成XML时遇到的问题

    错误信息:System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: Serve ...

  9. HDU 1106 排序 题解

    排序 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submissi ...

  10. 老麦看点:SEO高手的两大秘诀

    一.技术真的是主导因素吗? 很多人站长朋友操作一段网站之后,发现自己的排名还是在渺渺无期,真可谓:“众里寻排名千百度,可是排名却不在阑珊处”,于是我们开始怀疑自己,怀疑自己的技术等,但是我们静下心里仔 ...