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 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
一道水题,模拟#include <iostream>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <cctype>
#include <stdio.h>
#include <cmath>
#include <string.h>
#include <string>
#include <algorithm>
#define INF 0x3f3f3f3f
#define ClearAll(A,T) memset(A,T,sizeof(a))
using namespace std;
const int Max=110;
char str[Max];
int main()
{
int T,w=1;
scanf("%d",&T);
getchar();
while(T--)
{
gets(str);
int len=strlen(str);
for(int i=0; i<len; i++)
{
switch(str[i])
{
case 'n':
str[i]='u';
break;
case 's':
str[i]='5' ;
break;
case '5':
str[i]='s';
break;
case '!':
str[i]='i';
break;
case 'i':
str[i]='!' ;
break;
case 'w':
str[i]='m';
break;
case 'm':
str[i]='w' ;
break;
case 'p':
str[i]='d';
break;
case 'd':
str[i]='p' ;
break;
case 'u':
str[i]='n';
break;
case 'a':
str[i]='e' ;
break;
case 'e':
str[i]='a' ;
break;
case '7':
str[i]='l' ;
break;
case 'l':
str[i]='7' ;
break;
case '^':
str[i]='v' ;
break;
case 'v':
str[i]='^' ;
break;
default :
break;
}
}
printf("Case %d: ",w++);
for(int i=len-1;i>=0;i--)
{
printf("%c",str[i]);
}
printf("\n");
}
return 0;
}
版权声明:本文为博主原创文章,未经博主允许不得转载。
2012年"浪潮杯"山东省第三届ACM大学生程序设计竞赛--n a^o7 ! 分类: 比赛 2015-06-09 17:16 14人阅读 评论(0) 收藏的更多相关文章
- “浪潮杯”山东省第五届ACM大学生程序设计竞赛(总结贴)
第一次參加省赛有点小激动,尽管是作为打星队參赛,但心情却是上下起伏. 5月9号晚上11点多到威海,有点略冷.可是空气比淄博好多了,大家到了旅馆的时候都非常晚了,抱怨了一下三星级的酒店的待遇,喝杯咖啡早 ...
- UPC 2224 / “浪潮杯”山东省第四届ACM大学生程序设计竞赛 1008 Boring Counting 主席树
Problem H:Boring Counting Time Limit : 6000/3000ms (Java/Other) Memory Limit : 65535/32768K (Java/ ...
- [2012山东省第三届ACM大学生程序设计竞赛]——Mine Number
Mine Number 题目:http://acm.sdut.edu.cn/sdutoj/problem.php? action=showproblem&problemid=2410 Time ...
- [2012山东省第三届ACM大学生程序设计竞赛]——n a^o7 !
n a^o7 ! 题目:http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2413 Time Lim ...
- 从今天开始每天刷一题,并写在这里 分类: ACM 2015-06-16 23:52 14人阅读 评论(0) 收藏
开始什么题都可以,后面会加大难度. 每天! 如果有一天有特殊情况,也要来这里打卡,并说明原因,并在其他某一天补上! 版权声明:本文为博主原创文章,未经博主允许不得转载.
- 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 ...
- 山东省第四届ACM大学生程序设计竞赛解题报告(部分)
2013年"浪潮杯"山东省第四届ACM大学生程序设计竞赛排名:http://acm.upc.edu.cn/ranklist/ 一.第J题坑爹大水题,模拟一下就行了 J:Contes ...
- Alice and Bob(2013年山东省第四届ACM大学生程序设计竞赛)
Alice and Bob Time Limit: 1000ms Memory limit: 65536K 题目描述 Alice and Bob like playing games very m ...
- sdut Mountain Subsequences 2013年山东省第四届ACM大学生程序设计竞赛
Mountain Subsequences 题目描述 Coco is a beautiful ACMer girl living in a very beautiful mountain. There ...
随机推荐
- 学习CSS3BUTTON(二)
今天,继续学习其源代码: button { margin-left: 0; margin-right: 0; *padding: 5px 5px 3px 5px; } /*margin-left:设定 ...
- !! 浅谈Java学习方法和后期面试技巧
浅谈Java学习方法和后期面试技巧 昨天查看3303回复33 部落用户大酋长 下面简单列举一下大家学习java的一个系统知识点的一些介绍 一.java基础部分:java基础的时候,有些知识点是非常重要 ...
- log4net面面观之工作原理
转自:逗逼的博客:http://itrust.cnblogs.com/archive/2005/01/25/97225.html 要知道Log4net究竟是咋干活的,咱们可以从下面这个脉络简图入手.你 ...
- Java日志管理方法(转载)
原文地址:http://www.cnblogs.com/leocook/p/log_java.html java开发中常见的几种日志管理方案有以下4种: 1. Commons-logging + lo ...
- html 标签自己居中
<div style="width: 200px; height: 200px; border: 1px solid red; margin: 0 auto;">< ...
- sdutoj 2603 Rescue The Princess
http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2603 Rescue The Princess ...
- MyEclipse下如何安装和使用ibatis插件(网上的资料对于myeclipse8.5根本就是没有用的,所以我还是自己选择了装了一个eclipse,然后将插件装在了eclipse中)
(1)myeclipse→help→Myeclipse configuration center:点击sofeware选项卡,在Browes Software 下有一个输入框,点击add site按钮 ...
- linux第1天 fork exec 守护进程
概念方面 文件是对I/O设备的抽象表示.虚拟存储器是对主存和磁盘I/O设备的抽象表示.进程则是对处理器.主存和I/O设备的抽象表示 中断 早期是没有进程这个概念,当出现中断技术以后才出现进程这个概念 ...
- stdlib 头文件
stdlib 头文件即standard library标准库头文件.stdlib.h里面定义了五种类型.一些宏和通用工具函数. 类型例如size_t.wchar_t.div_t.ldiv_t和lldi ...
- Web服务器处理HTTP压缩之gzip、deflate压缩
现如今在处理http请求的时候,由于请求的资源较多,如果不启用压缩的话,那么页面请求的流量将会非常大.启用gzip压缩,在一定程度上会大大的提高页面性能. 目录 一.什么是gzip 二.什么是de ...