POJ 2538
2015-06-11 11:33
246 查看
#include<string> //#include #include<stdio.h> #include<iostream> using namespace std; char map[]={'`','1','2','3','4','5','6','7','8','9','0','-','=','Q','W','E','R','T','Y','U','I','O','P','[',']','\\','A','S','D','F','G','H','J','K','L',';','\'','Z','X','C','V','B','N','M',',','.','/'}; int main() { //freopen("acm.acm","r",stdin); string s; string s1; int pos; int i; for(i = 0; i < strlen(map); ++ i) { s += map[i]; } while(getline(cin,s1)) { for(i = 0; i < s1.length(); ++ i) { if(s1[i] != ' ') { pos = s.find(s1[i]); cout<<s[pos-1]; } else cout<<s1[i]; } cout<<endl; } }
相关文章推荐
- House Robber
- 《小王子》中的经典语录(中英文对照)
- POJ 2528
- 学习ocaml----(3)基础
- php简单smarty入门程序实例
- Linux-理解 Linux 的硬链接与软链接
- Android客户端与服务器端通过DES加密认证
- 常见的OnActivityForResult 方法接收回调问题
- twisted入门
- 图像分割
- HTTP状态码大全
- Excel Sheet Column Number -LeetCode
- [MapReduce] Google三驾马车:GFS、MapReduce和Bigtable
- android推送方式
- linux下创建和删除软、硬链接
- C实现 LeetCode->Roman to Integer
- adb shell am 的用法
- 为新建程序分配TCODE
- 查找表
- Hadoop安装求助