HDU 2140 Michael Scofield's letter
http://acm.hdu.edu.cn/showproblem.php?pid=2140
The letter from Michael every time is a string of lowercase letters. You should encode letters as the rules below:
b is ' ', q is ',', t is '!', m is l, i is e, c is a, a is c, e is i, l is m. It is interesting. Are you found that it is just change michael to leahcim?
Each case is a letter from Michael, the letteres won't exceed 10000.
#include <bits/stdc++.h>
using namespace std; const int maxn = 1e5 + 10;
char s[maxn];
char a[11]={'b', 'q', 't', 'm', 'i', 'c', 'a', 'e', 'l'};
char b[11]={' ', ',', '!', 'l', 'e', 'a', 'c', 'i', 'm'}; int main() {
while(~scanf("%s", s)) {
int len = strlen(s);
for(int i = 0; i < len; i ++) {
if(s[i] == 'b')
s[i] = ' ';
else if(s[i] == 't')
s[i] = '!';
else if(s[i] == 'm')
s[i] = 'l';
else if(s[i] == 'i')
s[i] = 'e';
else if(s[i] == 'c')
s[i] = 'a';
else if(s[i] == 'a')
s[i] = 'c';
else if(s[i] == 'e')
s[i] = 'i';
else if(s[i] == 'l')
s[i] = 'm';
else if(s[i] == 'q')
s[i] = ',';
} printf("%s\n", s);
}
return 0;
}
HDU 2140 Michael Scofield's letter的更多相关文章
- HDOJ/HDU 2140 Michael Scofield's letter(字符转换~)
Problem Description I believe many people are the fans of prison break. How clever Michael is!! In o ...
- 越狱Season 1-Episode 1: the pilot
the pilot: 美国电视剧新剧开播都会有一个试播来测试观众对新剧的接受程度,以此来决定是否再继续播下去,也可以说是一个开端,第一集,试播 -Tattoo Artist: That's it. t ...
- hdu3511 Prison Break 圆的扫描线
地址:http://acm.split.hdu.edu.cn/showproblem.php?pid=3511 题目: Prison Break Time Limit: 10000/5000 MS ( ...
- 【Java】Lucene检索引擎详解
基于Java的全文索引/检索引擎——Lucene Lucene不是一个完整的全文索引应用,而是是一个用Java写的全文索引引擎工具包,它可以方便的嵌入到各种应用中实现针对应用的全文索引/检索功能. L ...
- 越狱Season 1-Episode 19: The Key
Season 1, Episode 19: The Key -Kellerman: WeusedtohaveaGreatDane, Dane: 丹麦大狗 我们以前有一只大丹犬 bigandwild. ...
- 越狱Season 1- Episode 18: Bluff
Season 1, Episode 18: Bluff -Michael: Scofield Scofield Michael Scofield Michael Scofield -Patoshik: ...
- 越狱Season 1-Episode 15: By the Skin and the Teeth
Season 1, Episode 15: By the Skin and the Teeth -Pope: doctor...you can leave. 医生你得离开 -Burrows: It's ...
- 越狱Season 1-Episode 12:Odd Man Out
Season 1-Episode 12:Odd Man Out -Sorry to keep you waiting. 抱歉让你等了半天 -Oh, it's, uh, not a problem. 嗯 ...
- 越狱Season 1-Episode 11: And Then There Were 7-M
Season 1, Episode 11: And Then There Were 7-M -Michael: That one 那个 -businessman: Nice choice choice ...
随机推荐
- CentOS7 初始化配置
一.在安装的时候配置网卡名称的参数 . 选择“Install Centos ” . 按Tab,打开kernel启动选项后,增加 net.ifnames= biosdevname= 二.最小化安装完成之 ...
- set方法在set传入值时报空指针异常,直接设置定值即可
这种情况可能跟上下的程序有关,所以直接设置定值传入即可. 例如: re.setRid(ar.getRid()); // 这个是报错代码 md.setConnMailStatusTrue(ar.getR ...
- SSISDB3:Package的执行实例
SSISDB 系列随笔汇总: SSISDB1:使用SSISDB管理Package SSISDB2:SSIS工程的操作实例 SSISDB3:Package的执行实例 SSISDB4:当前正在运行的Pac ...
- 微服务介绍及Asp.net Core实战项目系列
0.目录 整体架构目录:ASP.NET Core分布式项目实战-目录 二.目录 0.微服务介绍 1.RESTful API 规范介绍 2.asp.net core介绍及swagger使用 3.asp. ...
- 10min 手写一个内存监控系统
本文的目的在于,尽可能用简单的代码,让大家了解内存监控的原理,及思想.更容易去理解Nagios.Zabbix.Ganglia监控原理,文章最后还有视频教程链接哦,从零敲出来的全过程 思路分为下面几块: ...
- XAF-如何实现自定义权限系统用户对象
本示例使用XPO. 新建一个XAF项目.填加两个类进来: [DefaultClassOptions] public class Employee : Person { public Employe ...
- Macaca上手体验
在研究了一段时间Appium后,尝试对另一个框架做实验——Macaca,阿里的开源测试框架,该框架不只适合移动端,同样适用于web端,可谓是方便的很啊~ 同时支持js.java.python.封装好的 ...
- 动态加载与插件系统的初步实现(四):解析JSON、扩展Fiddler
按文章结构,这部分应该给出WCFRest项目示例,我想WinForm示例足够详尽了,况且WCFRest还不需要使用插件AppDomain那一套,于是把最近写的Fiddler扩展搬上来吧. Fiddle ...
- 一个可以自由存取的onedriver
https://cittedu-my.sharepoint.com/personal/jostin_5gd_me/Documents/jostin
- 报错android.view.InflateException: Binary XML file line #11: Attempt to invoke virtual method 'boolean
出现这种问题,打开Android monitor的调试信息发现是 android.view.InflateException: Binary XML file line #11: Attempt to ...