// // main.c // poj1050 // // Created by 韩雪滢 on 10/13/16. // Copyright © 2016 韩雪滢. All rights reserved. // #include <stdio.h> #include <stdlib.h> #define MAXLEN 10000 /* poj1050 失败的小demo *其中包括 *读取一行字符串直到换行符 *将字符串按照空格拆分,将拆分的char[] 专为 int,正负整数 *用了一丢丢动态规划去求最大的值 *********************** *未实现的是 题目要求These are the N^2 integers of the array, presented in row-major order. That is, all numbers in the first row, left to right, then all numbers in the second row, left to right, etc. 也就是说,是连续的 */ int arraySize = 0; int max = 0; int getLine(char s[],int lim) { int c,i; for(i = 0;i < lim-1 && (c=getchar()) != ' ' ;i++){ s[i] = c; } //如果for结束是因为换行符 if(c == ' '){ s[i] = c; ++i; } s[i] = '