网址:https://leetcode.com/problems/maximum-binary-tree/ 参考: https://leetcode.com/problems/maximum-binary-tree/discuss/106146/C%2B%2B-O(N)-solution 我自己的做 ...
分类:
其他好文 时间:
2019-04-27 13:13:15
阅读次数:
119
题目如下: Given an array A of integers, return the length of the longest arithmetic subsequence in A. Recall that a subsequence of A is a list A[i_1], A[i ...
分类:
其他好文 时间:
2019-04-24 23:35:51
阅读次数:
207
115. Distinct Subsequences Given a string S and a string T, count the number of distinct subsequences of S which equals T. A subsequence of a string i ...
分类:
Web程序 时间:
2019-04-24 23:23:54
阅读次数:
180
原题地址 D. Beautiful Array 原题地址 D. Beautiful Array You are given an array aa consisting of nn integers. Beauty of array is the maximum sum of some consec ...
分类:
其他好文 时间:
2019-04-23 20:44:45
阅读次数:
193
原题链接:点击这里 一道很水很水的背包问题? 大概算不上背包吧QAQ 自己的dp 真的是太差劲啦,以后每天一道LeetCode 备战秋招! Runtime: 4 ms, faster than 82.08% of Java online submissions for Maximum Sum of ...
分类:
移动开发 时间:
2019-04-22 00:44:53
阅读次数:
182
neural networks 神经网络activation function 激活函数hyperbolic tangent 双曲正切函数bias units 偏置项activation 激活值forward propagation 前向传播feedforward neural network 前馈 ...
分类:
其他好文 时间:
2019-04-22 00:39:14
阅读次数:
152
New Year and Old Subsequence 第一感觉是离线之后分治求dp, 但是感觉如果要把左边的dp值和右边的dp值合起来, 感觉很麻烦而且时间复杂度不怎么对。。 然后就gun取看题解了, 用线段树维护dp的值, 然后区间合并求答案。 每个节点保存dp[ i ][ j ]表示, 把当 ...
分类:
其他好文 时间:
2019-04-21 20:07:33
阅读次数:
209
题目: Given an integer array, find three numbers whose product is maximum and output the maximum product. Example 1: Example 2: 分析: 给定一个数组,返回其中三个元素乘积的最大 ...
分类:
编程语言 时间:
2019-04-21 09:48:08
阅读次数:
131
题目链接:https://nanti.jisuanke.com/t/38232 就是判断输入是不是子序列 没想到贡献了将近十几次罚时..........可以说是菜的真实了 用cin cout超时了 改了scanf printf才过 ...
分类:
其他好文 时间:
2019-04-21 00:10:10
阅读次数:
220
转自:https://www.cnblogs.com/yoke/p/6949838.html RMQ(Range Minimum/Maximum Query),即区间最值查询,是指这样一个问题:对于一个长度N的数组,在多次询问中,每次都以O(1)的时间得到区间[a, b]的最大值或最小值。 这个问题 ...
分类:
编程语言 时间:
2019-04-20 19:42:30
阅读次数:
186