1007. To and Fro
来源:互联网 发布:零售门店数据分析 编辑:程序博客网 时间:2024/05/16 06:36
作业保持感觉。
AC:
#include <iostream>#include <cstring>using namespace std;int main() {int size;while(cin >> size && size != 0) {string tmpWord;cin >> tmpWord;char word[200][size];memset(word, '0', sizeof(word));int count = 0;for(int i = 0; i < 200; i++) {if(tmpWord[count] == '\0') {break;}if(i % 2 ==0) { for(int j = 0; j < size; j++) { word[i][j] = tmpWord[count++]; } } else { for(int j = size - 1; j >= 0; j--) { word[i][j] = tmpWord[count++]; } }}for(int i = 0; i < size; i++) { for(int j = 0; j < 200; j++) { if(word[j][i] != '0') { cout << word[j][i]; } }}cout << endl;}return 0;}
0 0
- 1007. To and Fro
- 1007. To and Fro
- 1007. To and Fro
- 1007. To and Fro
- 1007. To and Fro
- 1007. To and Fro
- 1007. To and Fro
- sicily--1007. To and Fro
- Sicily.1007. To and Fro
- Sicily 1007. To and Fro
- sicily 1007. To and Fro
- sicily 1007.To and Fro
- Sicily 1007. To and Fro
- [sicily]1007. To and Fro
- sicily 1007. To and Fro
- sicily 1007. To and Fro
- Sciliy 1007. To and Fro
- Sicily: 1007. To and Fro
- 20141008
- Win7下sublime text2加入右键快捷菜单
- Linux 下关闭防火墙设置
- Spring 注解@Component,@Service,@Controller,@Repository
- SQL Server2008附加数据库之后显示为只读时解决方法
- 1007. To and Fro
- zend studio 11的debug调试方式
- 解决乱码,让Sublime Text 2支持GB2312和GBK
- trick words 1
- 枚举
- Win7下sublime text2加入右键菜单
- 修改file的文字
- 第218天
- NSDictionary转plist文件本地读与写