\(\text{原题链接}\) \(\text{题目大意}\) 初始有一个长度为 \(n\) 的序列 \(a\),初始全 \(0\)。 共 \(m\) 次修改,每次修改 \((l,r,v)\),让 \(a_i = \max(a_i, v), (l\leq i\leq r)\)。求出所有操作后的 \( ...
分类:
其他好文 时间:
2021-02-15 12:15:44
阅读次数:
0
基数:不重复的元素 Redis Hyperloglog:用于做基数统计的算法 优点:占用的内容是固定的,2^64不同的元素的技术,只需要占用12kb内存!如果要从内存角度来比较的话Hyperloglog首选。 hyper log log命令以"pf"开头。 1.利用pfadd命令添加 127.0.0 ...
分类:
其他好文 时间:
2021-02-15 12:09:23
阅读次数:
0
题意 如题目所示 思路 遍历字符串建立一个哈希表来统计每个字符出现的次数,然后再从头遍历字符串进行查询即可 代码 class Solution { public: char firstUniqChar(string s) { if(s.empty()) { return ' '; } unorder ...
分类:
其他好文 时间:
2021-02-15 11:50:39
阅读次数:
0
#include<bits/stdc++.h> using namespace std; const int maxn=1e5+100; const int inf=1e9; int n,m,x; int dep[maxn];//节点在第几层 int num[maxn];//每一层的节点个数 int ...
分类:
其他好文 时间:
2021-02-15 11:49:10
阅读次数:
0
Hive 运行过程异常信息有时不能完全显示在终端上,此时可以用 Hive Debug 模 式进行调试 hive --hiveconf hive.root.logger=INFO,console 1、表不存在 FAILED: SemanticException [Error 10001]: Line ...
分类:
其他好文 时间:
2021-02-10 13:39:36
阅读次数:
0
按照salary的累计和running_total,其中running_total为前N个当前( to_date = '9999-01-01')员工的salary累计和,其他以此类推。 具体结果如下Demo展示。。CREATE TABLE `salaries` ( `emp_no` int(11) ...
分类:
其他好文 时间:
2021-02-10 13:19:08
阅读次数:
0
字符函数 函数返回值型 函数(参数) 描述 string base64(binary bin) 将二进制 bin 转换成 64 位的字符串 string concat(string|binary A, string|binary B...) 对二进制字节码或字符 串按次序进行拼接 array<str ...
分类:
其他好文 时间:
2021-02-10 13:05:47
阅读次数:
0
聚合函数 函数返回值型 函数(参数) 描述 BIGINT count(*), count(expr), count(DISTINCT expr[, expr...]) 1.统计总行数,包括含有 NULL 值的行 2.count(expr) 统计提 供非 NULL 的 expr 表达式 值的行数 3. ...
分类:
其他好文 时间:
2021-02-10 13:04:58
阅读次数:
0
首相要安装好hive 1.首先修改配置文件文件为hive 路径下的 conf/hive-sit.xml 将内容增加 <property> <name>hive.server2.thrift.port</name> <value>10000</value> <description>Port numb ...
分类:
数据库 时间:
2021-02-08 12:21:57
阅读次数:
0
ECNU 2537 统计字符 链接 https://acm.ecnu.edu.cn/problem/2537 题目 单点时限: 2.0 sec 内存限制: 256 MB 输入一行字符,分别统计其中英文字母、空格、数字和其他字符的个数。 输入格式 输入一个整数 ,表示有几组数据 接下来有 行,每行字符 ...
分类:
其他好文 时间:
2021-02-08 11:54:54
阅读次数:
0