这篇博客是从旧博客 WordPress 迁移过来,内容可能存在转换异常。
题目连接:
http://acm.hdu.edu.cn/showproblem.php?pid=1200
不行了,我要抓狂了,题目说大小是200.我写成了100~~~~结果TLE的10次。我就知道肯定是数组开小了,但是我一直去改post,而没注意是pre数组。。。郁闷啊!!! [s:10]
#include
#include
#include
using namespace std;
char pre[210], post[110][25];
int nColumn;
int main()
{
while(scanf("%d", &nColumn;) && nColumn)
{
getchar();
scanf("%s", pre);
int cnt = 0;
for(int i=0; i=0; --j)
post[i][j] = pre[cnt++];
}
for(int i=0; i