n a^o7 !

题目:http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2413

Time Limit: 1000MS Memory limit: 65536K

题目描写叙述

All brave and intelligent fighters, next you will step into a distinctive battleground which is full of sweet and happiness. If you want to win the battle, you must do warm-up according to my instructions, which can make you in the best state preparing to fight.
Now please relax yourself and enjoy the good moment. Before you raise your sharp sword to the enemy who guards the battleground, please allow me to tell you a true and romantic story about a samurai like you.


Samurai hh fell in love with girl ss, who is charming and demure. He realized the truth that he must spend his remaining life with ss, and resolved to pursue the hard-won affection. One day hh wrote a letter to ss, when she opens the letter with excitement
her mind was in tangle. She found herself completely not to figure out the meaning about the letter, which said that "n 55!w ! pue n a^o7 ! n paau !". ss also immersed herself in guessing the meaning of that letter for a long time because of her adore to hh.
Finally she called hh to ask the meaning of the letter. On the other side of the phone, hh was too nervous to say. Gradually he calmed down himself and told ss to reverse the letter and read it. Then on both ends of the phone comes the voice at the same time
"i need u i love u and i miss u".

ss wants to tell each of you however you are Brave And Skilled, you shouldn't forget to express your loyal love and romantic feelings to your prince or princess.

Now the horn sounds for battle,do it by the following input and output. I think each of you will get an "Accepted" in this battle with pleasant mood.



输入

Input contains an integer T in the first line, and then T lines follow .Each line contains a message (only contain 'n5!wpuea^o7!' and


' '(space)), the message's length is no more than 100.



输出

Output the case number and the message. (As shown in the sample output)



演示样例输入

2

n 55!w ! pue n a^o7 ! n paau !

n5!wpuea^o7

演示样例输出

Case 1: i need u i love u and i miss u

Case 2: loveandmisu



来源

2012年"浪潮杯"山东省第三届ACM大学生程序设计竞赛

今天,做第三届的省赛题目。

唉,又是不开心呐。。

我们小组分了几个模块,我负责的两个基本的就是 搜索和计算几何。

恩,前两次搜索少,这一次来搜索了,

可是,这个难度。。。⊙﹏⊙b汗。。。

浪费了好多时间也没做出来,让简单的题A的完了。

这道题就是倒过来看。。。

原图:

倒过来看:

那详细怎么实现呢?由于所输入的字符个数有限:only contain 'n5!wpuea^o7!' and 

' '(space)

这有这几个,打个表就能够了,是在不行用个switch也行。

对了,输出的时候别忘了是从后往前输出,

读入的时候要读入一整行(包含空格)。。

简单题,非常快AC

#include <iostream>
#include <stdio.h>
#include <cstring>
using namespace std;
char arr[310];
int main()
{
char s[105];
int i,j,t;
arr[ int('n') ]='u';
arr[ int('5') ]='s';
arr[ int('!') ]='i';
arr[ int('w') ]='m';
arr[ int('p') ]='d';
arr[ int('e') ]='a';
arr[ int('a') ]='e';
arr[ int('^') ]='v';
arr[ int('o') ]='o';
arr[ int('7') ]='l';
arr[ int(' ') ]=' ';
arr[ int('u') ]='n';
cin>>t;
cin.getline(s,101,'\n');
for(j=1;j<=t;++j)
{
cin.getline(s,101,'\n');
cout<<"Case "<<j<<": ";
for(i=strlen(s)-1;i>=0;--i)
cout<<arr[ int(s[i]) ];
cout<<endl;
}
return 0;
}

[2012山东省第三届ACM大学生程序设计竞赛]——n a^o7 !的更多相关文章

  1. [2012山东省第三届ACM大学生程序设计竞赛]——Mine Number

    Mine Number 题目:http://acm.sdut.edu.cn/sdutoj/problem.php? action=showproblem&problemid=2410 Time ...

  2. 2012年"浪潮杯"山东省第三届ACM大学生程序设计竞赛--n a^o7 ! 分类: 比赛 2015-06-09 17:16 14人阅读 评论(0) 收藏

    n a^o7 ! Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 All brave and intelligent fighte ...

  3. Alice and Bob(2013年山东省第四届ACM大学生程序设计竞赛)

    Alice and Bob Time Limit: 1000ms   Memory limit: 65536K 题目描述 Alice and Bob like playing games very m ...

  4. sdut Mountain Subsequences 2013年山东省第四届ACM大学生程序设计竞赛

    Mountain Subsequences 题目描述 Coco is a beautiful ACMer girl living in a very beautiful mountain. There ...

  5. 2013年山东省第四届ACM大学生程序设计竞赛-最后一道大水题:Contest Print Server

    点击打开链接 2226: Contest Print Server Time Limit: 1 Sec  Memory Limit: 128 MB Submit: 53  Solved: 18 [Su ...

  6. 山东省第四届ACM大学生程序设计竞赛解题报告(部分)

    2013年"浪潮杯"山东省第四届ACM大学生程序设计竞赛排名:http://acm.upc.edu.cn/ranklist/ 一.第J题坑爹大水题,模拟一下就行了 J:Contes ...

  7. angry_birds_again_and_again(2014年山东省第五届ACM大学生程序设计竞赛A题)

    http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2877 题目描述 The problems ca ...

  8. 2013年山东省第四届ACM大学生程序设计竞赛 Alice and Bob

      Alice and Bob Time Limit: 1000ms   Memory limit: 65536K 题目描述 Alice and Bob like playing games very ...

  9. 2013年山东省第四届ACM大学生程序设计竞赛J题:Contest Print Server

    题目描述     In ACM/ICPC on-site contests ,3 students share 1 computer,so you can print your source code ...

随机推荐

  1. 1. mybatis批量插入数据

    通过list <insert id="saveByList" useGeneratedKeys="true" parameterType="ja ...

  2. 一些javascript免费中文书籍

    在这里谢谢那些无私的人~~这些内容来自这里:我只把js的链接粘到这里了~ 还有其它技术文档, 实在是太多了, 多的看都看不完!!! Google JavaScript 代码风格指南 Google JS ...

  3. 《vi中的替换艺术》-linux命令五分钟系列之十一

    vi方面的内容不知道分类到哪里好,就放到<Linux命令五分钟系列>里吧! 今天编程,关于栈的一个小例子,其间我需要把”S.”替换为”S->”(替换不包括双引号). 其实这个不难,不 ...

  4. dedecms 常用标签调用

    /*------------------单个ip调用-------------------*/ {dede:type typeid="12"} <a title=" ...

  5. 总结几种C#窗体间通讯的处理方法

    摘要:本文介绍了C#窗体间通讯的几种处理方法,即传值.继承.事件回调,希望对大家有用. http://www.cnblogs.com/jara/p/3439603.html 应用程序开发中,经常需要多 ...

  6. Python使用纯真年代数据库qqwry.dat转换物理位置

    PS:网上直接找的,贴出来,方便以后随时用,感谢分享的人. #!/usr/bin/python #encoding: utf-8 import socket import codecs import ...

  7. Node.js RESTful API

    什么是REST架构? REST表示代表性状态传输.REST是一种基于Web标准的架构,并使用HTTP协议. 它都是围绕着资源,其中每一个组件是资源和一个资源是由一个共同的接口使用HTTP的标准方法获得 ...

  8. 【号外号外:微软收购 .NET 的开源实现 Xamarin 项目的公司】

    [首页小编:你好,关于博客园对Xamarin的报道确实一笔而过了,希望能不要把这篇文章移除首页呵呵,祝福帅气,聪明,敏捷,睿智的小编] 一个月后,微软开始免费Xamarin了....还要放开SDK.. ...

  9. 2015 BJOI 0102 Secret

    传送门:http://oj.cnuschool.org.cn/oj/home/problem.htm?problemID=477 试题描述: 在 MagicLand 这片神奇的大陆上,有样一个古老传说 ...

  10. Apache Struts 多个开放重定向漏洞(CVE-2013-2248)

    漏洞版本: Struts < 2.3.15.1 漏洞描述: BUGTRAQ ID: 61196 CVE(CAN) ID: CVE-2013-2248 Struts2 是第二代基于Model-Vi ...