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. LTE Module User Documentation(翻译11)——配置用户测量

    LTE用户文档 (如有不当的地方,欢迎指正!) 17 Configure UE measurements   仿真中激活的用户测量配置取决于所选的 “consumers”,例如切换算法.用户可能需要添 ...

  2. Windows上搭建hadoop开发环境

    前言 Windows下运行Hadoop,通常有两种方式:一种是用VM方式安装一个Linux操作系统,这样基本可以实现全Linux环境的Hadoop运行:另一种是通过Cygwin模拟Linux环境.后者 ...

  3. python3 登录接口

    登录接口 功能: 输入用户名(有一个用户名及对应的密码表) 认证成功后显示欢迎信息  输错三次后锁定(即第四次提示该账户已被锁定)用户登录锁定记录写到一个文件中. 用到:自定义函数.列表.字典 #Au ...

  4. C++中 接口的定义 COM

    首先定义一个虚基类的接口,其中包含虚函数AddRef Release QueryInterface,(MFC 类IUnKnown unknwn.h)分别是增加减去引用计数和查询接口然后定义一个实现类, ...

  5. Source Insight简介及下载破解

    对于长期混迹于.net平台的开发人员来说,研究C源码不是很常见,但是有时候我们不得不涉及c的研究,因为许多优秀的开源软件是用C/C++写就.查看C源码的利器除了VS外,还有另一个,那就是Source ...

  6. Validate Binary Search Tree [LeetCode]

    Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as ...

  7. Xcode 8 的 Debug 新特性

    Contents OverView Static Analyzer Localizability Instance Cleanup Nullablility Runtime Issue View De ...

  8. MongoDB搭建Replica Set Shard Cluster步骤

    本文记录从头搭建一个MongoDB 副本集分片集群的过程. 我们要创建一个这样子的分布式集群:有两个shard,每个shard都是一个replica set,各有两个副本(实际产品应用中还应加上一个仅 ...

  9. Octopus系列之数据上传格式要求说明

    各个数据列要求 价格列:字符串类型[美元价格] 产品名字:可以支持"/"等字符 分类名字:去空格处理 不得包含"&"符号 主图:一定要有主图列 不为空 ...

  10. iOS开发Swift篇—(一)简单介绍

    iOS开发Swift篇—简单介绍 一.简介 Swift是苹果于2014年WWDC(苹果开发者大会)发布的全新编程语言 Swift在天朝译为“雨燕”,是它的LOGO 是一只燕子,跟Objective-C ...