hdu oj 4300 Clairewd’s message AC code
来源:互联网 发布:淘宝装修全屏海报 编辑:程序博客网 时间:2024/04/29 12:25
#define _CRT_SECURE_NO_WARNINGS#include<iostream>#include<string>#include<vector>#include<cassert>using namespace std;int main(void){int T;cin >> T;while (T--) {string S, msg;while (cin >> S >> msg) {//assume division point.int div = (msg.length())/ 2;//cout << div << endl;//partial decryption.string pmsg(msg.begin(), msg.begin()+div);for (int i = 0; i < pmsg.length(); ++i) {pmsg[i] = 'a'+S.find(pmsg[i]);}//cout << pmsg << endl;//pinpoint the division point.int pos;for (pos = div; pos < msg.length(); ++pos) {if (msg.compare(pos, msg.length() - pos, pmsg.c_str(),msg.length() - pos) == 0)break;}cout << msg.substr(0, pos);for (int i = 0; i < pos; ++i) {cout << (char)('a' + S.find(msg[i]));}cout << endl;}}//system("pause");return 0;}
0 0
- hdu oj 4300 Clairewd’s message AC code
- hdu 4300 Clairewd’s message
- hdu 4300 Clairewd’s message
- HDU-Clairewd’s message-4300
- hdu 4300 Clairewd’s message
- HDU 4300 Clairewd’s message
- HDU 4300 Clairewd’s message
- hdu 4300 Clairewd’s message
- HDU 4300 Clairewd’s message
- hdu 4300 Clairewd’s message
- hdu 4300 Clairewd’s message
- HDU 4300 Clairewd’s message
- HDU 4300 Clairewd’s message
- HDU 4300 Clairewd’s message
- HDU-4300Clairewd’s message
- HDU 4300 Clairewd’s message
- hdu 4300 Clairewd’s message
- HDU/HDOJ----4300 Clairewd’s message
- tail跟踪日志时打印时间
- Spinner学习
- 全球CPU四大IP核的攻“芯”战
- Elasticsearch+Kibana+Logstash 搭建日志平台
- Android 语言国际化
- hdu oj 4300 Clairewd’s message AC code
- linphone sdk 的使用
- Cursor的close方法源码解析
- 软件架构之 - Tier和Layer
- 完全卸载node.js
- java线程池使用
- UI之UINavigationBar的用法
- Fragment的生命周期
- Verizon发布2014年数据泄露调查报告:九大攻击模式为主