n a^o7 !

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)

示例输入

2n 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

颠倒一串字符!

#include <iostream>
#include <stdio.h>
#include <math.h>
#include<string.h>
using namespace std;
char *s="n5!wpuea^o7";
char *d="usimdnaevol ";
int panduan(char e)
{
for(int i=0;i<strlen(s);i++)
{
if(s[i]==e)return i;
}
return 11; }
int main()
{
char c[105],k[105]={0};
int n,kk=1;
scanf("%d%*c",&n);
while(n--)
{
gets(c);
printf("Case %d: ",kk++);
int j=0;
for(int i=0;i<(int)strlen(c);i++)
{
k[j++]=d[panduan(c[i])];
}
for(--j;j>=0;j--)printf("%c",k[j]);
printf("\n");
}
return 0;
}

SDUT 2413:n a^o7 !的更多相关文章

  1. sdut 2413:n a^o7 !(第三届山东省省赛原题,水题,字符串处理)

    n a^o7 ! Time Limit: 1000MS Memory limit: 65536K 题目描述 All brave and intelligent fighters, next you w ...

  2. 【叉积】【sdut 2508 图形密码】

    图形密码 Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 题目链接:http://acm.sdut.edu.cn/sdutoj/p ...

  3. sdut 1592转置矩阵【稀疏矩阵的压缩存储】【快速转置算法】

    转置矩阵 Time Limit: 1000ms   Memory limit: 32768K  有疑问?点这里^_^ 题目链接:http://acm.sdut.edu.cn/sdutoj/proble ...

  4. sdut 2125串结构练习--字符串匹配【两种KMP算法】

    串结构练习——字符串匹配 Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目链接:http://acm.sdut.edu.cn/sduto ...

  5. sdut 2498【aoe 网上的关键路径】

    http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2498 代码超时怎么破: #include< ...

  6. sdut 487-3279【哈希查找,sscanf ,map】

    487-3279 Time Limit: 2000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 题目链接: sdut:   http://acm.sdut.ed ...

  7. sdut 1465 公共因子

    公共因子 Time Limit: 1000MS Memory limit: 65536K 题目描述 题目链接:http://acm.sdut.edu.cn/sdutoj/problem.php?act ...

  8. 排队打饭 sdut 2443【最简单的贪心法应用举例】

    排队打饭 Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 题目链接:http://acm.sdut.edu.cn/sdutoj/p ...

  9. sdut 2445 小学数学

    小学数学 Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 题目链接:http://acm.sdut.edu.cn/sdutoj/p ...

随机推荐

  1. C# SQL优化 及 Linq 分页

    每次写博客,第一句话都是这样的:程序员很苦逼,除了会写程序,还得会写博客!当然,希望将来的一天,某位老板看到此博客,给你的程序员职工加点薪资吧!因为程序员的世界除了苦逼就是沉默.我眼中的程序员大多都不 ...

  2. Beyond Compare

    Beyond Compare是一个比较文件和文件夹的工具.  它可以帮助你找到并协调源代码.文件夹.图像和数据间的差异,即使包括zip文档中或者FTP站点上的文件.  另外它还可以同步化文件夹并验证不 ...

  3. 如何在PHP里面连接数据库

    第一步   创造一个连接 $a = mysql_connect("localhost","root",""); 括号里面参数的意思: 1.l ...

  4. Python条件循环判断

    1.条件判断语句 Python中条件选择语句的关键字为:if .elif .else这三个.其基本形式如下: 1 2 3 4 5 6 7 8 9 age_of_cc = 27   age = int( ...

  5. manacher 最长回文子串

    确定当前已知能匹配到的最长处,看是否要更新最长 #include <bits/stdc++.h> using namespace std; const int N = 210005; in ...

  6. zjuoj 3603 Draw Something Cheat

    http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3603 Draw Something Cheat Time Limit: 2 ...

  7. c++之路进阶——codevs4543(普通平衡树)

    4543 普通平衡树  时间限制: 1 s  空间限制: 128000 KB  题目等级 : 大师 Master       题目描述 Description 这是一道水题 顺便祝愿LEZ和ZQQ 省 ...

  8. tostring() 作用

    tostring() 作用 -->显示类中属性的值 -->不想显示该类的内存地址

  9. Java里的File I/O

    Java的输入流主要由:InputStream和Reader作为基类,把持久化数据读入内存.输出流由OutputStream和Write类作为父类. 其中读如内存的时候,不可能一下去全读进去,需要一个 ...

  10. paper 47 :Latex中文显示(转)

    中文支持需要cjk-latex,总得来说中文可以使用GB和GBK两种字体,GBK需要从windows下copy *.ttc或*.ttf, GB字体则在linux下就用. 先说支持GB的中文显示,安装以 ...