HDU 1200 字符串
来源:互联网 发布:windows 终端软件 编辑:程序博客网 时间:2024/05/22 15:15
#include<iostream>#include<string>#include<cstring>#include<algorithm>#include<cstdio>#include<cmath>#include<cctype>using namespace std;int main() { int n; while(cin>>n&&n) { string s; cin>>s; string f[1000]; int a=0,j; for(j=0; a+n<=s.size(); j++,a+=n) { f[j].assign(s,a,n); if(j%2)reverse(f[j].begin(),f[j].end()); } if(a<s.size()-1){ int l=s.size()-a; f[j].assign(s,a,l); ++j; } for(int i=0,k;i<n;++i) for(k=0;k<j;k++) cout<<f[k][i]; cout<<endl; } return 0;}
- HDU 1200 字符串
- hdu字符串
- HDU--1200:To and Fro (字符串)
- hdu 2017 字符串统计
- HDU 1274 展开字符串
- 【字符串暴力】hdu 2847
- HDU-1039 字符串处理
- HDU 1048 字符串
- hdu 1020 简单字符串
- HDU 1274(展开字符串)
- HDU 2017 字符串统计
- HDU 1274 展开字符串
- hdu 1062 字符串处理
- hdu 1088 字符串
- HDU 2100 字符串
- HDU 1238 字符串
- hdu 1036 (字符串)
- hdu 1048 字符串处理
- HDU 1238 字符串
- 高性能JavaScript模板引擎原理解析
- 欧拉函数
- hdu 2082 找单词
- 品牌特卖汇
- HDU 1200 字符串
- ZOJ 3690 矩阵快速幂乘
- VS2008 C++ 调用MATLAB 2009b 生成的DLL
- ios category类别的使用
- Java学习总结(不断更新中)
- HDU 1059 背包问题
- paip.Winista HTMLParser文本结点的获取
- 新文章
- 文章2