ZOJ_1295
2010-07-27 11:03
351 查看
#include <cstdlib> #include <iostream> #include <algorithm> using namespace std; const int MAX = 80; int main(int argc, char *argv[]) { //freopen("input.txt", "rt", stdin); //freopen("output.txt", "wt", stdout); char ch[MAX]; int flag = 0; while(cin.getline(ch, 80)) { if(flag == 0) { flag = 1; continue; } int size = strlen(ch) - 1; int hafSize = (size + 1) / 2; for(int i=0; i<hafSize; i++) swap(ch[i], ch[size - i]); cout << ch << endl; } return EXIT_SUCCESS; }
相关文章推荐
- ZOJ 1295 Reverse Text
- ZOJ_1295解题报告
- zoj1151 zoj1295 Word Reversal 字符串的简单处理
- [ZOJ]1295
- ZOJ1295 Reverse Text
- ZOJ Problem Set - 1295 Reverse Text
- [水]ZOJ1295
- ZOJ Problem Set - 1295 Reverse Text
- zoj1295
- ZOJ Problem Set–1295 Reverse Text
- ZOJ 1295——Reverse Text
- zoj1151 zoj1295 Word Reversal 字符串的简单处理
- ZOJ 1295 Reverse Text
- ZOJ-1113,1115,1295,超简单题
- ZOJ 1295 - Reverse Text
- ZOJ 1295: Reverse Text - cin.getline()
- HDU1321 ZOJ1295 Reverse Text【水题】
- ZOJ 1295: Reverse Text
- ZOJ - 1295 - Reverse Text
- zoj 1295 python