POJ 3749
第一道简单密码学的题,太水了,本不打算做,第一道,还是纪念一下。
#include <iostream>
#include <cstdio>
#include <cstring>
#include <string.h>
#include <algorithm> using namespace std; char trans[30]={'V','W','X','Y','Z','A','B','C','D','E','F','G','H','I','J',
'K','L','M','N','O','P','Q','R','S','T','U'}; char en[20];
char scode[200]; bool readin(){
gets(en);
if(strcmp(en,"START")==0)
return true;
return false;
} int main(){
while(readin()){
gets(scode);
for(int i=0;scode[i]!='\0';i++){
if(scode[i]<'A'||scode[i]>'Z')
cout<<scode[i];
else
cout<<trans[scode[i]-'A'];
}
cout<<endl;
gets(en);
}
return 0;
}
POJ 3749的更多相关文章
- POJ 1704 Georgia and Bob(阶梯Nim博弈)
Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 11357 Accepted: 3749 Description Geor ...
- POJ 3370. Halloween treats 抽屉原理 / 鸽巢原理
Halloween treats Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 7644 Accepted: 2798 ...
- POJ 2356. Find a multiple 抽屉原理 / 鸽巢原理
Find a multiple Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7192 Accepted: 3138 ...
- POJ 2965. The Pilots Brothers' refrigerator 枚举or爆搜or分治
The Pilots Brothers' refrigerator Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 22286 ...
- POJ 1753. Flip Game 枚举or爆搜+位压缩,或者高斯消元法
Flip Game Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 37427 Accepted: 16288 Descr ...
- POJ 3254. Corn Fields 状态压缩DP (入门级)
Corn Fields Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 9806 Accepted: 5185 Descr ...
- POJ 2739. Sum of Consecutive Prime Numbers
Sum of Consecutive Prime Numbers Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 20050 ...
- POJ 2255. Tree Recovery
Tree Recovery Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 11939 Accepted: 7493 De ...
- POJ 2752 Seek the Name, Seek the Fame [kmp]
Seek the Name, Seek the Fame Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 17898 Ac ...
随机推荐
- BA-水阀接线(图)
220V水阀接线
- winform显示系统托盘,双击图片图表显示窗体,退出窗体是否提示
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { DialogResult result = Messag ...
- 拥抱Mac之码农篇
拥抱Mac之码农篇 使用Mac大概两年时间.之前用着公司配的一台27寸的iMac.无奈机械硬盘严重拖慢速度,影响工作心情.于是入手Macbook Retina 13.这两年的开发工作所有在Mac上完毕 ...
- inconsistent line endings 解决方法
I'm using Unity 3D in combination with Visual Studio 2008 on a Windows 7 64 bit system. When savi ...
- HDU 5493 Queue 树状数组+二分
Queue Problem Description N people numbered from 1 to N are waiting in a bank for service. They all ...
- HDU1237 简单计算器 【栈】+【逆波兰式】
简单计算器 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Subm ...
- IOC与DI区别
(1)IOC:控制反转,把对象创建交给spring进行配置. (2)DI:依赖注入,向类里面的属性中设置值. (3)关系:依赖注入不能单独存在,需要在IOC的基础之上完成操作.
- mysqli的简单工具包
mysqli的简单工具包 <?php /** * 连接 * @param string $host * @param string $user * @param string $password ...
- PySide2运行出错问题解决
PySide2是QT官方出的Python的QT封装, 不过默认安装运行时候会有一些小问题, 可能是系统里已经安装过其他版本QT的原因, 会报错如下: PySide2 qt.qpa.plugin: Co ...
- Winform WPF 窗体显示位置
WinForm 窗体显示位置 窗体显示的位置首先由窗体的StartPosition决定,FormStartPosition这个枚举值由如下几种情况 // 摘要: // 窗体的位置由 System.Wi ...