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

思路分析:水题,字符偏移求解,注意字符串输入问题即可。

代码如下:

#include <iostream>
#include <string>
using namespace std; const int MAX_N = + ;
char A[MAX_N]; int main()
{
int Len;
char Tmp[]; while ( scanf( "%s", Tmp )!= EOF )
{
if( strcmp( Tmp, "ENDOFINPUT" ) == )
break; getchar( );
gets( A );
Len = strlen( A );
for ( int i = ; i < Len; ++i )
{
if ( A[i] >= 'A' && A[i] <= 'Z' )
A[i] = (( ( A[i]-'A') - + ) % ) + 'A';
}
gets( Tmp );
cout << A << endl;
} return ;
}

1298 The Hardest Problem Ever的更多相关文章

  1. poj 1298 The Hardest Problem Ever

    题目链接:http://poj.org/problem?id=1298 题目大意:按照所给的顺序要求将输入的字符串进行排列. #include <iostream> #include &l ...

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

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

  3. HDU1048The Hardest Problem Ever

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

  4. The Hardest Problem Ever(字符串)

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

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

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

  6. HDUOJ-------The Hardest Problem Ever

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

  7. hdu_1048_The Hardest Problem Ever_201311052052

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

  8. poj1298 The Hardest Problem Ever 简单题

    链接:http://poj.org/problem?id=1298&lang=default&change=true 简单的入门题目也有这么强悍的技巧啊!! 书上面的代码: 很厉害有没 ...

  9. POJ1298_The Hardest Problem Ever_最难的问题_Caesar 密码_C++

    题目:http://poj.org/problem?id=1298 好吧,给了题目也看不懂……给出翻译(题目名翻译是:最难的问题,233333) 这一看就是老师给出题解: 然而没有什么用哈 最快的办法 ...

随机推荐

  1. oracle execute immediate

    declare   aa         ,);   l_cnt      );   i_yr       ;   i_curCode  ) :='001';   i_vDate    date := ...

  2. C# 委托和方法

    委托是一种特殊的引用类型,它将方法也作为特殊的对象封装起来,从而将方法作为变量或参数进行传递 using System; using System.Collections.Generic; using ...

  3. ##DAY4 事件的基本概念、触摸的基本概念、响应者链、手势

    ##DAY4  事件的基本概念.触摸的基本概念.响应者链.手势 #pragma mark ———————事件的基本概念 ——————————— 事件的基本概念: 1)事件是当用户的手指触击屏幕及在屏幕 ...

  4. C# 查找指定名称的控件(转)

    请问我知道控件的名称如何得到这个控件对象呢? var button = this.FindName("button1") as Button; Button button = th ...

  5. 操作百度API

    string json = ""; try { //虽然两者都是异步请求事件,但是WebClient是基于事件的异步,而HttpWebRequst是基于代理的异步编程 WebCli ...

  6. 网络编程——TCP连接

    TCP在双方传输数据前,发送方先请求建立连接,接收方同意建立连接后才能传输数据.(打电话:先拨号,等对方同意接听后,才能交流)...高可靠性 UDP不需要建立连接(发短信).不可靠,可能出现数据丢失等 ...

  7. selenium 学习笔记 ---新手学习记录(10) 问题总结(java)--poi--excel 操作

    1.当我使用poi想要操作xlsx时,报错,解决方法下载xmlbeans-2.6.0.jar架包,引入即可.点我下载 https://yunpan.cn/cSdVqp6e4v6Jk  访问密码 2c5 ...

  8. (Problem 49)Prime permutations

    The arithmetic sequence, 1487, 4817, 8147, in which each of the terms increases by 3330, is unusual ...

  9. 射频识别技术漫谈(16)——Mifare UltraLight

    Mifare UltraLight又称为MF0,从UltraLight(超轻的)这个名字就可以看出来,它是一个低成本.小容量的卡片.低成本,是指它是目前市场中价格最低的遵守ISO14443A协议的芯片 ...

  10. ThreadSafeClientConnManager用来支持多线程的使用http client

    import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.clien ...