/* Write a program to remove trailing blanks and tabs from each line of input,
and to delete entirely blank lines. */
#include
#define MAXLINE 1000 /* maximum input line size */
int getl...
分类:
其他好文 时间:
2015-07-27 23:04:22
阅读次数:
139
/* Write a function reverse(s) that reverses the character string s. Use it to
write a program that reverses its input a line at a time. */
#include
#define MAXLINE 1000 /* maximum input l...
分类:
其他好文 时间:
2015-07-27 23:00:48
阅读次数:
135
题目要求:
输入一个整型数组,有正数也有负数。数组中一个或连续的多个整数组成一个字数组。求所有子数组和的最大值。要求时间复杂度O(n).leetcode | Maximum Subarray 最大连续子序列的和:
http://blog.csdn.net/quzhongxin/article/details/46603957当前和是大于0,则对最大和是有贡献的,保留;
当前和是小于0,则对最大...
分类:
编程语言 时间:
2015-07-27 21:06:29
阅读次数:
120
Given a sequence of integers S = fS1; S2; : : : ; Sng, you should determine what is the value of the
maximum positive product involving consecutive terms of S. If you cannot nd a positive sequence,
...
分类:
其他好文 时间:
2015-07-27 21:03:46
阅读次数:
112
两个暴力题。。
题目传送:11827 Maximum GCD
AC代码:
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define LL l...
分类:
其他好文 时间:
2015-07-27 16:24:02
阅读次数:
66
问题描述Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longes...
分类:
其他好文 时间:
2015-07-27 13:02:11
阅读次数:
98
那是因为nginx限制了上传文件大小,必须指定下。在nginx.conf的http{}中增加client_max_body_size 20m;增加上传大小限制同时要修改php.ini中相关参数[Resource Limits]max_execution_time = 800; Maximum exe...
分类:
Web程序 时间:
2015-07-27 12:58:03
阅读次数:
140
题目:
Given a binary tree, find the maximum path sum.
The path may start and end at any node in the tree.
For example:
Given the below binary tree,
1
/ 2 3
Ret...
分类:
编程语言 时间:
2015-07-26 22:39:28
阅读次数:
189
/* Write a program to print all input lines that are longer than 80 characters. */
#include
#define MAXLINE 1000 /* maximum input line size */
#define LONGLINE 80
int getline(char line[], in...
分类:
其他好文 时间:
2015-07-26 19:15:48
阅读次数:
104
题目:Given an arraynums, there is a sliding window of sizekwhich is moving from the very left of the array to the very right. You can only see theknumbe...