题目:http://poj.org/problem?id=1298

  好吧,给了题目也看不懂……给出翻译(题目名翻译是:最难的问题,233333)

  

  这一看就是老师给出题解:

  

  然而没有什么用哈

  最快的办法是,把下面的密文直接拷过来,建个字符数组

  然后读入,判断是否是 ENDOFINPUT

  不是就读入原文,把大写字母翻译出来

  记得换行

  最后读掉 END

 #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<algorithm>
using namespace std; const char hs[]={'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'};
char s[];
int main()
{
int i,len;
while ()
{
gets(s);
if (s[]=='E'&&s[]=='N'&&s[]=='D'&&s[]=='O'&&s[]=='F'&&s[]=='I'&&s[]=='N'&&s[]=='P'&&s[]=='U'&&s[]=='T'&&s[]=='\0') return ;
gets(s);
len=strlen(s);
for (i=;i<len;i++)
{
if (s[i]>='A'&&s[i]<='Z') putchar(hs[s[i]-'A']);
else putchar(s[i]);
}
putchar('\n');
gets(s);
}
}

版权所有,转载请联系作者,违者必究

联系方式:http://www.cnblogs.com/hadilo/p/5932395.html

POJ1298_The Hardest Problem Ever_最难的问题_Caesar 密码_C++的更多相关文章

  1. Poj1298_The Hardest Problem Ever(水题)

    一.Description Julius Caesar lived in a time of danger and intrigue. The hardest situation Caesar eve ...

  2. HDU1048The Hardest Problem Ever

    The Hardest Problem Ever Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & ...

  3. The Hardest Problem Ever(字符串)

    The Hardest Problem Ever Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 24039   Accept ...

  4. (字符串 枚举)The Hardest Problem Ever hdu1048

    The Hardest Problem Ever 链接:http://acm.hdu.edu.cn/showproblem.php?pid=1048 Time Limit: 2000/1000 MS ...

  5. HDUOJ-------The Hardest Problem Ever

    The Hardest Problem Ever Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java ...

  6. hdu_1048_The Hardest Problem Ever_201311052052

    The Hardest Problem Ever Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java ...

  7. HDOJ 1048 The Hardest Problem Ever(加密解密类)

    Problem Description Julius Caesar lived in a time of danger and intrigue. The hardest situation Caes ...

  8. C - The Hardest Problem Ever

    Description Julius Caesar lived in a time of danger and intrigue. The hardest situation Caesar ever ...

  9. POJ 1298 The Hardest Problem Ever【字符串】

    Julius Caesar lived in a time of danger and intrigue. The hardest situation Caesar ever faced was ke ...

随机推荐

  1. [Hibernate] - Criteria Select

    使用Hibernate的Criteria做查询. 参考文档: http://docs.jboss.org/hibernate/orm/3.5/reference/zh-CN/html/querycri ...

  2. 怎么利用WinPE恢复系统注册表?

    我们的电脑总是会遇到各种各样的问题,最好用的方式就是电脑重装,重装系统的方式有很多,光盘安装.硬盘安装.U盘安装等.但是碰到电脑系统瘫痪无法启动,甚至连安全模式也进不了的时候,你的光盘.硬盘就没有用处 ...

  3. php 连接测试sphinx

    shpinx.php <?php header("Content-type:text/html;charset=utf-8"); include 'SphinxClient. ...

  4. IntelliJ IDEA中怎么查看方法说明?

    View→Quick Documentation 查看当前配置的快捷键(例如Ctrl + Q) 在光标所在的方法上按下快捷键就可以看到方法的说明 下图为在View菜单中查看当前配置的快捷键截图: 下图 ...

  5. FastReport使用二——二维码

    以下内容在FastReport Designer 中测试通过,如下图所示: 在使用FastReport Designer创建一维吗也就是一般普通的条码时,设置其Barcode属性为Code128 (建 ...

  6. SQL Server 2012 批量重建索引

    关于索引的概念可以看看宋大牛的博客 T-SQL查询高级—SQL Server索引中的碎片和填充因子 整个数据库的索引很多,索引碎片多了,不可能一个个的去重建,都是重复性的工作,所以索性写了个存储过程, ...

  7. 黄聪:C#超级延时方法,延迟系统时间但系统又能同时能执行其它任务

    private void Delay(int Millisecond) //延迟系统时间,但系统又能同时能执行其它任务: { DateTime current = DateTime.Now; whil ...

  8. python简要

    python用冒号代替{}开启语句块 /usr/bin/python 加在脚本的头部, ./脚本 help("str") : 查看命令帮助 '''三引号可以打印换行字符串 prin ...

  9. Java面试必备知识

    JAVA面试必备知识 第一,谈谈final, finally, finalize的区别. 第二,Anonymous Inner Class (匿名内部类) 是否可以extends(继承)其它类,是否可 ...

  10. duplicate symbols

    duplicate symbol _mCollecatView in: /Users/Rubert/Library/Developer/Xcode/DerivedData/ChengDuHidengD ...