码迷,mamicode.com
首页 >  
搜索关键字:max sum    ( 43452个结果
go 环境搭建
1,下载 Golang官网下载地址:https://golang.google.cn/dl/ 2,解压到指定目录 3,运行go 获取环境变量修改方法 go help env usage: go env [-json] [-u] [-w] [var ...] Env prints Go environ ...
分类:其他好文   时间:2021-06-02 11:10:05    阅读次数:0
⑤.shell 循环while
语法示例: while 条件为真 do echo ok done #!/bin/bash while true do echo ok done while循环数字 #!/bin/bash a=1 b=9 while [ $a -lt 10 ] do sum=$((a + b)) echo $a + ...
分类:系统相关   时间:2021-06-02 11:02:44    阅读次数:0
最小乘积生成树
思想和分治凸包算法很像。 把生成树的$(\sum_x,\sum_y)\(投射到平面上,我们要找到\)(x,y)$使得$x,y$最小。 可以证明,最优的$(x,y)$在凸包上。 证明可见2018国集论文。 考虑怎么求凸包,可以分治,保证当前处理的$(l,r)$是凸包上的连续一段。 先求出凸包的最左/最 ...
分类:其他好文   时间:2021-05-25 18:40:07    阅读次数:0
c语言求输入的任一整数的各位数之和
源码: # include<stdio.h> int main(void){int a,i=0,sum=0;scanf("%d",&a);if(a<0) a=-a;//求负整数的while(a){sum+=(a%10);//sum存各位数之和a/=10;}printf("各位数字之和为:%d\n", ...
分类:编程语言   时间:2021-05-25 18:29:36    阅读次数:0
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
【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
O(logn)最长上升子序列并输出
O(logn)最长上升子序列并输出 +++ pre数组记录转移。 #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int N = 1e6 ...
分类:其他好文   时间:2021-05-25 17:36:48    阅读次数: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
C语言实现更相减损术和辗转相除法及效率对比
更相减损术 #include <stdio.h> int main(void) { int a = 0, b = 0, cnt = 0, min = 0, max = 0, sub = 1; scanf("%d%d", &a, &b); while(!(a & 0x1) && !(b & 0x1)) ...
分类:编程语言   时间:2021-05-24 17:03:25    阅读次数:0
43452条   上一页 1 ... 13 14 15 16 17 ... 4346 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!