码迷,mamicode.com
首页 >  
搜索关键字:maximum sum subarray    ( 25087个结果
python之1-100之间的总和,奇数和,偶数和
一、总和 i = 1 sum = 0 while i <= 100: sum += i i += 1 print(sum) 二、奇数和 i = 1 sum = 0 while i <= 100: if i % 2 != 0: sum += i i += 1 print(sum) 三、偶数和 i = ...
分类:编程语言   时间:2021-05-25 18:19:09    阅读次数:0
Map 实现类之一:HashMap
Map 实现类之一:HashMap?HashMap是 Map 接口 使用频率最高的实现类。?允许使用null键和null值,与HashSet一样,不保证映射的顺序。?所有的key构成的集合是Set:无序的、不可重复的。所以,key所在的类要重写:equals()和hashCode()?所有的valu ...
分类:其他好文   时间:2021-05-25 18:06:36    阅读次数:0
Javascript 浮点数
在复习归并排序的时候,使用到了递归,我一直以为是递归函数没写对,导致了Maximum call stack size exceeded 栈溢出,但是其实是JavaScript浮点数的自动转换的问题! function sort(arry,left,right){ if(left right){ re ...
分类:编程语言   时间:2021-05-25 17:48:06    阅读次数:0
【luogu P3369】普通平衡树(fhq Treap 做法)
平衡树模板题,要求维护一些操作。 插入一个数,删除一个数,查询一个数的排名,查询排名一直的数,找前驱后继。 ...
分类:其他好文   时间:2021-05-25 17:46:12    阅读次数:0
logstash报错如下:Validation Failed: 1: this action would add [2] total shards, but this cluster currently has [999]/[1000] maximum shards open
超过最大分片引起的,在es机器上执行:curl -XPUT -H "Content-Type:application/json" -d '{"persistent":{"cluster":{"max_shards_per_node":10000}}}' 'http://es-host:9200/_c ...
分类:其他好文   时间:2021-05-25 17:41:51    阅读次数:0
算法打卡 week10
437. 路径总和 III class Solution: def pathSum(self, root: TreeNode, sum: int) -> int: dp = {} def search(root: TreeNode): if root: search(root.left) searc ...
分类:编程语言   时间:2021-05-24 17:23:14    阅读次数:0
【ybt金牌导航3-2-4】【luogu P5038】奇怪游戏 / 奇怪的游戏
有一个棋盘,每次你可以选相邻的两个位置都加一。 问你最少要多少次操作才能让棋盘上的数都变成一样的,如果不能就输出 -1。 ...
分类:其他好文   时间:2021-05-24 15:59:03    阅读次数:0
算法学习:给定一个序列求最大子序列的和
题目 给定一个序列,给出最大子序列的和。 解答 public class maxSubSum { public static int maxSubSum1(int [] a){ int maxSum = 0; for (int i = 0; i < a.length; i++) { for(int ...
分类:编程语言   时间:2021-05-24 14:09:52    阅读次数:0
2021ccpc黑龙江省赛dp题
#include <iostream> #include <cstring> #include <cmath> using namespace std; using ll=long long ; const int maxn=1e3+10; int dp[maxn][maxn]; int sum[m ...
分类:其他好文   时间:2021-05-24 13:59:03    阅读次数:0
Jsp语法
JSP表达式 <%--JSP表达式 作用:用来将程序的输出,输出到客户端 <%= 变量或者表达式%> --%> <%= new java.util.Date()%> jsp脚本片段 1 <%--jsp脚本片段--%> 2 <% 3 int sum = 0; 4 for (int i = 1; i < ...
分类:Web程序   时间:2021-05-24 13:47:30    阅读次数:0
25087条   上一页 1 ... 8 9 10 11 12 ... 2509 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!