poj2039
来源:互联网 发布:php安卓编辑器 编辑:程序博客网 时间:2024/05/22 06:19
#include<iostream>#include<fstream>using namespace std;int main(){ //ifstream cin("1.txt"); int n; while(cin>>n&&n!=0){ string s; cin>>s; char a[s.length()/n][n]; for(int i=0;i<s.length();++i){ int r=i/n; int c=i%n; if(r%2==1) c=n-1-c; a[r][c]=s[i]; } for(int i=0;i<n;++i) for(int j=0;j<(s.length()/n);++j) cout<<a[j][i]; cout<<endl; } return 0;}
0 0
- poj2039
- poj2039
- poj2039
- poj2039
- poj2039
- POJ2039:反反复复
- 【poj2039】To and Fro
- POJ2039 To and Fro
- POJ2039--To and Fro--字符串水题
- JAVA中this用法小结
- Linux下OpenCV2.4.x的安装与配置
- Linux内核链表学习笔记
- java解析xml的几种方式
- 多人报数问题
- poj2039
- 个人感悟
- Console命令详解,让调试js代码变得更简单
- android封装好的方法写增删改查
- Python C API 解读随笔 ----简介篇
- 单例模式 singleton
- A*算法文档
- Java学习笔记--继承中的构造方法
- C++:关于什么对象要放到class的public范围中,什么对象放到class的private范围中