POJ1298_The Hardest Problem Ever_最难的问题_Caesar 密码_C++
题目: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++的更多相关文章
- Poj1298_The Hardest Problem Ever(水题)
一.Description Julius Caesar lived in a time of danger and intrigue. The hardest situation Caesar eve ...
- HDU1048The Hardest Problem Ever
The Hardest Problem Ever Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & ...
- The Hardest Problem Ever(字符串)
The Hardest Problem Ever Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 24039 Accept ...
- (字符串 枚举)The Hardest Problem Ever hdu1048
The Hardest Problem Ever 链接:http://acm.hdu.edu.cn/showproblem.php?pid=1048 Time Limit: 2000/1000 MS ...
- HDUOJ-------The Hardest Problem Ever
The Hardest Problem Ever Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java ...
- hdu_1048_The Hardest Problem Ever_201311052052
The Hardest Problem Ever Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java ...
- HDOJ 1048 The Hardest Problem Ever(加密解密类)
Problem Description Julius Caesar lived in a time of danger and intrigue. The hardest situation Caes ...
- C - The Hardest Problem Ever
Description Julius Caesar lived in a time of danger and intrigue. The hardest situation Caesar ever ...
- POJ 1298 The Hardest Problem Ever【字符串】
Julius Caesar lived in a time of danger and intrigue. The hardest situation Caesar ever faced was ke ...
随机推荐
- [Hibernate] - Criteria Select
使用Hibernate的Criteria做查询. 参考文档: http://docs.jboss.org/hibernate/orm/3.5/reference/zh-CN/html/querycri ...
- Neutron LBaaS Service(2)—— Neutron Services Insertion Model
Service Insertion Service Insertion是Neutron中实现L4/L7层服务的框架.Neutron以前只有一级插件结构用于实现各种L2层技术(如LinuxBridge, ...
- Neutron分析(6)—— neutron-openvswitch-agent
neutron-openvswitch-agent代码分析 neutron.plugins.openvswitch.agent.ovs_neutron_agent:main # init ovs fi ...
- SPOJ #11 Factorial
Counting trailing 0s of n! It is not very hard to figure out how to count it - simply count how many ...
- 使用 Windows PowerShell 来管理和开发 windowsazure.cn 账户的特别注意事项
6月6日,微软面向中国大陆用户开放了Microsoft Azure公众预览版的申请界面.大家可以申请免费的 beta 试用,收到内附邀请码的通知邮件后只需输入激活码即可开始免费试用.具体网址为: ht ...
- android学习笔记34——ClipDrawable资源
ClipDrawable ClipDrawable代表从其他位图上截取一个“图片片段” 在XML文件中定义ClipDrawable对象使用<clip.../>元素,该元素的语法为: 以上语 ...
- 拒绝了对对象 'sp_sdidebug'(数据库 'master',所有者 'dbo')的 EXECUTE 权限。
如果在调试过程中出现异常“拒绝了对对象 'sp_sdidebug'(数据库 'master',所有者 'dbo')的 EXECUTE 权限.”则可以通过以下方式解决: 打开master数据库,打开扩展 ...
- Linux进程内存分析pmap命令(转)
名称: pmap - report memory map of a process(查看进程的内存映像信息)用法 pmap [ -x | -d ] [ -q ] pids... ...
- POJ 1986 DIstance Query LCA水题
给出一棵树,对于每一个询问,给出2个节点,输出2个节点的距离. 输入中有字母,那个是没有用的,不用管. 思路: 0.选择编号为1的节点作为树的root (注意:有些题的边是单向的,这时候我们要根据节点 ...
- 触发隐藏链接进行文件下载,click无响应
function invokeClick(element) { if (element.click) element.click(); //判断是否支持click() 事件 else if (elem ...