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 ...
随机推荐
- WPF 学习笔记-设置属性使窗口不可改变大小
原文:WPF 学习笔记-设置属性使窗口不可改变大小 调整Windows下的ResizeMode属性: ResizeMode = NoResize Resize属性是控制Windows是否可以改变大小, ...
- RabbitMQ(三):消息持久化策略
原文:RabbitMQ(三):消息持久化策略 一.前言 在正常的服务器运行过程中,时常会面临服务器宕机重启的情况,那么我们的消息此时会如何呢?很不幸的事情就是,我们的消息可能会消失,这肯定不是我们希望 ...
- JAVA Swing开发单机版项目
一.序 最近公司做的项目里出现了一个新的需求,项目大部分是为金融业定制开发的数据集成平台,包括数据的采集,处理,使用. 数据的采集方式不固定,有机构化数据,有非结构话数据,还有附件等其它文件形式. 对 ...
- jQuery学习-属性选择器
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- python+soket实现 TCP 协议的客户/服务端中文(自动回复)聊天程序
[吐槽] 网上的代码害死人,看着都写的言之凿凿,可运行就是有问题. 有些爱好代码.喜欢收藏代码的朋友,看到别人的代码就粘贴复制过来.可是起码你也试试运行看啊大哥 [正文] 昨日修改运行了UDP协议的C ...
- 5249: [2018多省省队联测]IIIDX
5249: [2018多省省队联测]IIIDX 链接 分析: 贪心. 将给定的权值从大到小排序,从第一个往后挨个赋值,考虑第i个位置可以赋值那些树.首先满足前面必须至少有siz[i]个权值没选,如果存 ...
- python模块-datetime模块
上面一篇已经讲了time模块,再来学习datetime模块. datetime主要有datetime.timedelta.time.date这4个子模块. a.datetime常用的函数(dateti ...
- 关于 Git SSH 使用的项目实践
Git 是分布式的代码管理工具,远程的代码管理是基于 SSH 的,所以要使用远程的 git 则需要SSH的配置. 一.简述 访问 Git 仓库可以使用 SSH Key 的方式,首先需要生成 Key. ...
- Excel表格生成sql语句
假如excel表格中有A.B.C三列数据,希望导入到数据库users表中,对应的字段分别是name,sex,age ,在你的excel表格中增加一列,利用excel的公式自动生成sql语句,方法如下: ...
- SpringBoot日记——登录与拦截器篇
之前的文章我们把登录页写了出来,但是想要让登录现实他的基本功能,要如何做呢?本篇文章就来帮你实现第一步,让登录页对账号密码做校验,并且完成登录跳转. LoginController 1. 要实现登录, ...