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 ...
随机推荐
- 20155238 2016-2017-2 《Java程序设计》第一周学习总结
教材内容总结 浏览教材,根据自己的理解每章提出一个问题 1.Java语言跨平台的依据是什么?标准的出现是否会限制JAVA的开发与发展? 2.怎样理解类?PATH对于Java编写的意义是什么? 3.Ja ...
- 20155234 2016-2017-2 《Java程序设计》第7周学习总结
20155234 2016-2017-2 <Java程序设计>第7周学习总结 教材学习内容总结 第十二章 Lambda Lambda表达式会使程序更加地简洁,在平行设计的时候,能够进行并行 ...
- 北京Uber优步司机奖励政策(4月24日)
滴快车单单2.5倍,注册地址:http://www.udache.com/ 如何注册Uber司机(全国版最新最详细注册流程)/月入2万/不用抢单:http://www.cnblogs.com/mfry ...
- 四分历python实现
根据一个新加坡人的c代码改写成python代码 ''' 四分历''' # zq = 0 month = 0 def main(): global month year = 1 rb_year = 0 ...
- 微信小程序:选项卡页面切换
一.功能描述 在同一个页面内实现不同展示页面的切换功能,如下图所示 二.代码实现 1. index.js Page({ /** * 页面的初始数据 */ data: { currentData : 0 ...
- Unity3d之Hash&Slash学习笔记(一)--角色属性类的构架
角色属性类的构架 角色属性类有8个类,继承关系如下图: 每个类的具体作用见之后的随笔
- 程序员,Python 这次彻底上位了!
在 2018 年底,我们迎来了编程语言的最后一波洗礼.近期 TIOBE 公布了 12 月编程语言排行榜,前三名变为: Java.C.Python. 而在 PYPL 榜单上 Python 在今年 5 月 ...
- 为什么 Action/ViewController/ProperttyEditor不可见或不可用?
英文版:https://documentation.devexpress.com/eXpressAppFramework/112818/Concepts/Extend-Functionality/De ...
- 详解华为云基因容器服务GCS
基因测序,作为“下一个能够改变世界”的技术,已经由实验室研究演变到临床使用,为人类预测罹患多种疾病的可能性,提前预防和治疗疾病提供了一套可靠的方法和手段.而基于基因测序在预防和治疗疾病方面的准确和可靠 ...
- ESP8266/ESP32模块晶振频偏调试
ESP8266/ESP32模块晶振频偏调试 !> 前提:晶振频偏调试是需要仪器设备的支持才能完成的. 测试环境:IQ2010综合测试仪 本文仅记录有关频偏调试的主要内容,其余不在赘述. IQ20 ...