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)

示例输入

  1. 2
  2. n 55!w ! pue n a^o7 ! n paau !
  3. n5!wpuea^o7

示例输出

  1. Case 1: i need u i love u and i miss u
  2. Case 2: loveandmisu
  3. 一道水题,模拟
  4. #include <iostream>
  5. #include <map>
  6. #include <set>
  7. #include <stack>
  8. #include <queue>
  9. #include <cctype>
  10. #include <stdio.h>
  11. #include <cmath>
  12. #include <string.h>
  13. #include <string>
  14. #include <algorithm>
  15. #define  INF 0x3f3f3f3f
  16. #define ClearAll(A,T) memset(A,T,sizeof(a))
  17. using namespace std;
  18. const int Max=110;
  19. char str[Max];
  20. int main()
  21. {
  22.     int T,w=1;
  23.     scanf("%d",&T);
  24.     getchar();
  25.     while(T--)
  26.     {
  27.         gets(str);
  28.         int len=strlen(str);
  29.         for(int i=0; i<len; i++)
  30.         {
  31.             switch(str[i])
  32.             {
  33.             case 'n':
  34.                 str[i]='u';
  35.                 break;
  36.             case 's':
  37.                 str[i]='5' ;
  38.                 break;
  39.             case '5':
  40.                 str[i]='s';
  41.                 break;
  42.             case '!':
  43.                 str[i]='i';
  44.                 break;
  45.             case 'i':
  46.                 str[i]='!' ;
  47.                 break;
  48.             case 'w':
  49.                 str[i]='m';
  50.                 break;
  51.             case 'm':
  52.                 str[i]='w' ;
  53.                 break;
  54.             case 'p':
  55.                 str[i]='d';
  56.                 break;
  57.             case 'd':
  58.                 str[i]='p' ;
  59.                 break;
  60.             case 'u':
  61.                 str[i]='n';
  62.                 break;
  63.             case 'a':
  64.                 str[i]='e' ;
  65.                 break;
  66.             case 'e':
  67.                 str[i]='a' ;
  68.                 break;
  69.             case '7':
  70.                 str[i]='l' ;
  71.                 break;
  72.             case 'l':
  73.                 str[i]='7' ;
  74.                 break;
  75.             case '^':
  76.                 str[i]='v' ;
  77.                 break;
  78.             case 'v':
  79.                 str[i]='^' ;
  80.                 break;
  81.             default :
  82.                 break;
  83.             }
  84.         }
  85.         printf("Case %d: ",w++);
  86.         for(int i=len-1;i>=0;i--)
  87.         {
  88.             printf("%c",str[i]);
  89.         }
  90.         printf("\n");
  91.     }
  92.     return 0;
  93. }
  94.  

版权声明:本文为博主原创文章,未经博主允许不得转载。

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

  1. “浪潮杯”山东省第五届ACM大学生程序设计竞赛(总结贴)

    第一次參加省赛有点小激动,尽管是作为打星队參赛,但心情却是上下起伏. 5月9号晚上11点多到威海,有点略冷.可是空气比淄博好多了,大家到了旅馆的时候都非常晚了,抱怨了一下三星级的酒店的待遇,喝杯咖啡早 ...

  2. UPC 2224 / “浪潮杯”山东省第四届ACM大学生程序设计竞赛 1008 Boring Counting 主席树

    Problem H:Boring Counting Time Limit : 6000/3000ms (Java/Other)   Memory Limit : 65535/32768K (Java/ ...

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

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

  4. [2012山东省第三届ACM大学生程序设计竞赛]——n a^o7 !

    n a^o7 ! 题目:http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2413 Time Lim ...

  5. 从今天开始每天刷一题,并写在这里 分类: ACM 2015-06-16 23:52 14人阅读 评论(0) 收藏

    开始什么题都可以,后面会加大难度. 每天! 如果有一天有特殊情况,也要来这里打卡,并说明原因,并在其他某一天补上! 版权声明:本文为博主原创文章,未经博主允许不得转载.

  6. hash值的计算与转换 分类: ACM TYPE 2015-05-07 17:49 36人阅读 评论(0) 收藏

    #include <bits/stdc++.h> using namespace std; const int MAXN = 100; const int X = 3; long long ...

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

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

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

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

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

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

随机推荐

  1. GTA项目 三, 使用 bootstrap table展示界面,使得data和UI分离

    /** bootstrap-table - v1.5.0 - 2014-12-12* https://github.com/wenzhixin/bootstrap-table* Copyright ( ...

  2. 《30天自制操作系统》03_day_学习笔记

    harib00a: 添加的部分从P46开始,制作IPL准备开始从磁盘装载程序了 笔者讲解了软盘的驱动的构造,以及汇编语言读取软盘的方法 MOV AX,0x0820 MOV ES,AX ; 柱面0 ; ...

  3. 通用窗口类 Inventory Pro 2.1.2 Demo1(上)

    插件功能 按照Demo1的实现,使用插件来实现一个装备窗口是很easy的,虽然效果还很原始但是也点到为止了,本篇涉及的功能用加粗标出,具体的功能如下: 1.实现了两个窗口,通过点击键盘I来,打开或者关 ...

  4. 解决Ueditor 不兼容IE7 和IE8

    引用Ueditor的js 的时候用 绝对路径

  5. java项目中可能会使用到的jar包解释

    一.Struts2 用的版本是struts2.3.1.1 一个简单的Struts项目所需的jar包有如下8个 1. struts2-core-2.3.1.1.jar: Struts2的核心类库. 2. ...

  6. override 与 overdown 的区别

    重写与重载的区别 1. 重载是方法的名称相同.参数或参数类型不同,进行多次重载以适应不同的需要       2. 重写是进行基类中函数的重写.为了适应需要.

  7. Hibernate反转维护

    //反转维护 @Test public void test4(){ Session ses=new Configuration().configure().buildSessionFactory(). ...

  8. 夺命雷公狗ThinkPHP项目之----企业网站20之网站前台头尾分离

    我们的网站直接让他头尾进行分离即可: 然后在代码里面找到id 为header的这段代码: 然后将整个div的内容都给弄出来,然后在view里面创建一个Public的目录,然后在创建一个header.h ...

  9. [OrangePi] Building the system

    You can try to build Debian/Ubuntu for OrangePI yourself. Clone my GitHub repository. You will need ...

  10. remoting方式

    1. WebService跨平台,跨防火墙,但是很抱歉,基于xml速度慢2. RMI(java)/Remoting(.net)平台相关,基于二进制序列化,速度快.3.dcom(com+)spring提 ...