链接:https://leetcode-cn.com/problems/is-subsequence 给定字符串 s 和 t ,判断 s 是否为 t 的子序列。 你可以认为 s 和 t 中仅包含英文小写字母。字符串 t 可能会很长(长度 ~= 500,000),而 s 是个短字符串(长度 <=100 ...
分类:
其他好文 时间:
2020-01-26 12:59:01
阅读次数:
56
本篇内容有clip_by_value、clip_by_norm、gradient clipping 1.tf.clip_by_value a = tf.range(10) print(a) # if x<a res=a,else x=x print(tf.maximum(a,2)) # if x>a ...
分类:
其他好文 时间:
2020-01-24 23:49:07
阅读次数:
163
Given a group of two strings, you need to find the longest uncommon subsequence of this group of two strings. The longest uncommon subsequence is defi ...
分类:
其他好文 时间:
2020-01-24 10:50:25
阅读次数:
98
2020-01-23 19:39:26 问题描述: 问题求解: public int maxWidthRamp(int[] A) { Stack<Integer> stack = new Stack<>(); int res = 0; int n = A.length; for (int i = 0 ...
分类:
其他好文 时间:
2020-01-23 21:19:19
阅读次数:
93
"题目" 题意:就是给你一个数组,让你输出排好序后,相邻元素差值最大的那个差值。 题解:首先,当然我们可以用快排,排完序之后,遍历一遍数组,就能得到答案了。但是快速排序的效率是O(n logn),不是题目要求的线性效率,也就是O(n)的效率。 那么诸多排序算法中,也是由线性效率的排序算法,当然这些算 ...
分类:
编程语言 时间:
2020-01-22 19:58:21
阅读次数:
96
题目:给定一个整数数组 nums ,找到一个具有最大和的连续子数组(子数组最少包含一个元素),返回其最大和。 来源:https://leetcode-cn.com/problems/maximum-subarray/solution/ 法一:动态规划 思路:关键是要正确的写出状态转移方程.dp[i] ...
分类:
其他好文 时间:
2020-01-22 13:15:57
阅读次数:
65
Given a positive integer num consisting only of digits 6 and 9. Return the maximum number you can get by changing at most one digit (6 becomes 9, and ...
分类:
其他好文 时间:
2020-01-22 10:56:58
阅读次数:
75
链接: "LeetCode646" 给出?n?个数对。?在每一个数对中,第一个数字总是比第二个数字小。 现在,我们定义一种跟随关系,当且仅当?b [3,4]$ 相关标签: 动态规划 很明显这道题能通过动态规划解,令dp[i]表示为以索引i为结尾的最长数对链的长度,则当$pairs[i][0] pai ...
分类:
其他好文 时间:
2020-01-22 10:49:52
阅读次数:
75
1 //第一个答案2(5+10) 第二个 3(3+4+5) 2 //令 sum[i]=a0+a1+...+ai, as+...+a(t-1)>=S 3 //有 as+a(s+1)+...+a(t-1)=sum[t]-sum[s] 4 //则 ai+...+an=sum[n]-sum[i]>=S 5 ...
分类:
其他好文 时间:
2020-01-21 21:45:47
阅读次数:
75
错误信息 错误原因 so文件损坏 或者ida换成32 解决办法 重新获得so文件,或者调整ida的位数 ...
分类:
其他好文 时间:
2020-01-20 16:19:53
阅读次数:
164