“玲珑杯”线上赛 Round #15 河南专场 F -- 咸鱼文章
来源:互联网 发布:淘宝军刺暗语 编辑:程序博客网 时间:2024/05/16 12:06
题目连接:F -- 咸鱼文章
Time Limit:1s Memory Limit:128MByte
Submissions:467Solved:192
elttiL moT nwod eht teerts sllac ruo god " ehT peek god " . piZ si a peehs god . tuB nehw moT seirt ot yas " peeS " , ti semoc tuo " peek " . dnA ni a yaw moT si thgir . piZ si syawla gnignirb sgniht oh rof su ot peek ! ll'I llet uoy tuoba emos fo meht .
s'piZ tsrif tneserp saw a eohs . tI saw edam fo neerg klis .
eW t'ndid wonk woh piZ dnuof eht eohs . tuB retfa a tnemom yraM , ym gib retsis , dlot em eht eohs dah a egnarts llems . I deddon dna dleh ym eson . " tahW od uoy kniht ti si ? "
" tI sllems ekil gnihtemos rof gninaelc . I kniht enoemos deirt ot naelc a tops ffo eht eohs . nehT eh tup ti ta eht rood ot yrd . "
" gnolA emac piZ . dnA eyb-doog eohs ! " I dias . " eW dluohs ekat ti kcab . "
" eW t'nac " . dias ym rettsis .
" ebyaM elttil moT si thgir , " yraM dias . " ebyaM piZ si a peek god ! "
你正在做英语阅读,可哪知这是一篇咸鱼文章,整个文章的所有单词都是翻转的,你很慌。
不过你是咸鱼程序员,你可以写代码将这篇文章翻转回来,那么翻转回来吧。
//// main.cpp// F -- 咸鱼文章//// Created by teddywang on 2017/5/31.// Copyright © 2017年 teddywang. All rights reserved.//#include <iostream>#include<cstdio>#include<cstring>#include<algorithm>using namespace std;char s[1000010];char t[1000];int main(){ while(gets(s)) { int len=strlen(s); int j=0; for(int i=0;i<len;i++) { if((s[i]<='Z'&&s[i]>='A')||(s[i]<='z'&&s[i]>='a')) { t[j++]=s[i]; } else { for(int k=j-1;k>=0;k--) { printf("%c",t[k]); } printf("%c",s[i]); j=0; } } if(j!=0) { for(int k=j-1;k>=0;k--) { printf("%c",t[k]); } } printf("\n"); }}
- “玲珑杯”线上赛 Round #15 河南专场:F -- 咸鱼文章
- “玲珑杯”线上赛 Round #15 河南专场 F -- 咸鱼文章
- “玲珑杯”线上赛 Round #15 河南专场 F咸鱼文章
- “玲珑杯”线上赛 Round #15 河南专场 F -- 咸鱼文章
- “玲珑杯”线上赛 Round #15 河南专场:G -- 咸鱼拷问
- “玲珑杯”线上赛 Round #15 河南专场:E -- 咸鱼旅行
- “玲珑杯”线上赛 Round #15 河南专场:C -- 咸鱼魔法记
- “玲珑杯”线上赛 Round #15 河南专场:D -- 咸鱼商店
- “玲珑杯”线上赛 Round #15 河南专场 C咸鱼魔法记
- “玲珑杯”线上赛 Round #15 河南专场 D -- 咸鱼商店
- “玲珑杯”线上赛 Round #15 河南专场 E -- 咸鱼旅行
- “玲珑杯”线上赛 Round #15 河南专场 G -- 咸鱼拷问 RMQ
- “玲珑杯”线上赛 Round #15 河南专场 C
- “玲珑杯”线上赛 Round #15 咸鱼文章(栈)
- “玲珑杯”线上赛 Round #15 河南专场:A -- Reverse the lights
- “玲珑杯”线上赛 Round #15 河南专场 A -- Reverse the lights DP
- DP训练 玲珑杯线上赛 Round #15 河南专场:A -- Reverse the lights [线性DP]
- “玲珑杯” 线上赛 Round #15 咸鱼拷问(RMQ)
- 和Postgresql系统监控有关的几个标准统计视图
- hibernate的dao层
- Yii2 Pjax 使用
- UE4 本地化文本语言修改
- linux系统编程之管道(二):管道读写规则
- “玲珑杯”线上赛 Round #15 河南专场 F -- 咸鱼文章
- Eclipse C/C++ 开发环境搭建
- sklearn之DTS学习
- iptables--知识总结2
- ExtGrid行项动态变色且选中行可复制
- [android] 手机卫士自定义控件的属性
- debian和win7系统时间显示一致
- c/c++整理--c++面向对象(5)
- linux系统编程之管道(三):命令管道(FIFO)