POJ 1298
#include<iostream>// chengdacaizi 注释!2008 11 05
#include<string>
using namespace std; int main()
{
while(true)
{
string start;//用于控制循环
cin>>start;//
if(start=="ENDOFINPUT")break;
string text;//密码字符串;
cin.ignore(,'\n');//关键步骤 忽略除了‘\n’以外的一切字符 包括'\0'
getline(cin,text);//用getline(cin,&string)输入字符串
int K;
for(K=;K<text.size();++K)
{
if('A'<=text[K] && text[K]<='Z')//对密码进行翻译;
{
if(text[K]<'A'+)text[K]+=;
else text[K]-=;
}
}
string end;
cin>>end;//存放"END";
cout<<text<<endl;// 输出翻译后的密码!
}
return ;
}
关注我的公众号,当然,如果你对Java, Scala, Python等技术经验,以及编程日记,感兴趣的话。

技术网站地址: vmfor.com
POJ 1298的更多相关文章
- poj 1298 The Hardest Problem Ever
题目链接:http://poj.org/problem?id=1298 题目大意:按照所给的顺序要求将输入的字符串进行排列. #include <iostream> #include &l ...
- poj 1298(水题)
The Hardest Problem Ever Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 24241 Accept ...
- POJ 1298 The Hardest Problem Ever【字符串】
Julius Caesar lived in a time of danger and intrigue. The hardest situation Caesar ever faced was ke ...
- UVALive 4639 && SPOJ SPOINTS && POJ 3805 && AOJ 1298 Separate Points 求两个凸包是否相交 难度:3
https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_probl ...
- POJ水题 1298
#include "stdafx.h" #include <iostream> #include <string> using namespace std; ...
- POJ 题目分类(转载)
Log 2016-3-21 网上找的POJ分类,来源已经不清楚了.百度能百度到一大把.贴一份在博客上,鞭策自己刷题,不能偷懒!! 初期: 一.基本算法: (1)枚举. (poj1753,poj2965 ...
- (转)POJ题目分类
初期:一.基本算法: (1)枚举. (poj1753,poj2965) (2)贪心(poj1328,poj2109,poj2586) (3)递归和分治法. (4)递推. ...
- poj分类
初期: 一.基本算法: (1)枚举. (poj1753,poj2965) (2)贪心(poj1328,poj2109,poj2586) (3)递归和分治法. ( ...
- poj 题目分类(1)
poj 题目分类 按照ac的代码长度分类(主要参考最短代码和自己写的代码) 短代码:0.01K--0.50K:中短代码:0.51K--1.00K:中等代码量:1.01K--2.00K:长代码:2.01 ...
随机推荐
- 2018.10.12 NOIP训练 01 串(倍增+hash)
传送门 一道挺不错的倍增. 其实就是处理出每个数连向的下一个数. 由于每个点只会出去一条边,所以倍增就可以了. 开始和zxyzxyzxy口胡了一波O(n+m)O(n+m)O(n+m)假算法,后来发现如 ...
- 2018.07.23 洛谷P4097 [HEOI2013]Segment(李超线段树)
传送门 给出一个二维平面,给出若干根线段,求出x" role="presentation" style="position: relative;"&g ...
- tp5月统计的bug
月统计求和时 本月第一天没有统计到
- hibernate从浅至深
hibernate在开发中的位置 web------>struts2--------->hibernate ORM框架 Hibernate是一个数据持久化层的ORM框架. Object:对 ...
- hdu 1231 最大连续子序列 ,1003 Max Sum;
题目(1231) #include<stdio.h> #include<iostream> using namespace std; int main() { int K,nu ...
- application cache 应用缓存
这些应用还是要自己实现一遍,否则真不知道哪里会出问题. 客户端: <!DOCTYPE html> <html manifest = 'demo.appcache'> <h ...
- C++回调:利用函数指针
#include <iostream> using namespace std; /**************************************************** ...
- 四、创建覆盖网络--Flannel
Flannel是 CoreOS 团队针对 Kubernetes 设计的一个覆盖网络(Overlay Network)工具,其目的在于帮助每一个使用 Kuberentes 的 CoreOS 主机拥有 ...
- Facebook支撑万亿Post搜索背后的技术窥探
转自http://www.csdn.net/article/2013-10-29/2817333-under-the-hood-building-posts-search 近日,Facebook为po ...
- Checkpoint--查看各DB上的脏页
可以使用sys.dm_os_buffer_descriptors来看数据页在buffer pool中的状态,其中is_modified来标示数据页是否为脏页 --------------------- ...