SDUT 2413 哈希
来源:互联网 发布:淘宝客服接待人数 编辑:程序博客网 时间:2024/06/16 11:48
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 uCase 2: loveandmisu
提示
来源
示例程序
倒过来看:
因为所输入的字符个数有限:only contain 'n5!wpuea^o7!' and
' '(space)
这有这几个,打个表就可以了,是在不行用个switch也行。
对了,输出的时候别忘了是从后往前输出,
读入的时候要读入一整行(包括空格)。。#include<iostream>#include<cstdio>#include<cstring>#include<cstdlib>using namespace std;int main(){ int n; char a[1000]; a[int('!')]='i'; a[int(' ')]=' '; a[int('n')]='u'; a[int('5')]='s'; a[int('w')]='m'; a[int('p')]='d'; a[int('e')]='a'; a[int('a')]='e'; a[int('^')]='v'; a[int('o')]='o'; a[int('7')]='l'; a[int(' ')]=' '; a[int('u')]='n'; char s[1000]; scanf("%d%*c",&n); for(int k=1; k<=n; k++) { gets(s);printf("Case %d: ",k);int len=strlen(s); for(int i=len-1;i>=0;i--){printf("%c",a[int(s[i])]);}printf("\n");}}
- SDUT 2413 哈希
- sdut 2413
- sdut 2413 字符加密
- SDUT 2413:n a^o7 !
- SDUT 2413-n a^o7 !
- SDUT OJ 2413 n a^o7 !
- SDUT (并查集+哈希)
- [1525]字符统计2 (哈希)SDUT
- SDUT 3039 迷之好奇(哈希)
- SDUT-2109&&SDUT-3398
- SDUT Ubiquitous Religions(并查集+哈希)
- SDUT 1480 哈希,找次数最多且数最小的
- sdut 1248
- sdut 1468
- sdut 2039
- sdut 2123
- sdut Emergency
- sdut 2151
- Java架构师与程序开发者需求的工具
- 1019. 数字黑洞 (20)
- [Tue, 11 Aug 2015 ~ Mon, 17 Aug 2015] Deep Learning in arxiv
- Python 中的继承之Super用法
- ExtJS 常用组件属性 及使用方法
- SDUT 2413 哈希
- 语不惊人死不休(157)自由选择,自负后果
- 在AndroidMainfest中锁定屏幕方向
- HDU 1874 畅通工程续
- KVC基本使用
- linux ln 命令使用参数详解(ln -s 软链接)
- position与anchorPoint
- 常见排序算法(冒泡,选择,快速)的C语言实现【修正版】
- Gonet2 游戏服务器框架解析之gRPC提高(5)