#include<bits/stdc++.h>#define ll long long#define speed_up ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);using namespace std;const ll nl=1e5+5;/ ...
分类:
其他好文 时间:
2020-07-26 23:23:20
阅读次数:
105
一看就会,一做就废😔 5472. 重新排列字符串 给你一个字符串 s 和一个 长度相同 的整数数组 indices 。 请你重新排列字符串 s ,其中第 i 个字符需要移动到 indices[i] 指示的位置。 返回重新排列后的字符串。 示例 1: 输入:s = "codeleet", indic ...
分类:
编程语言 时间:
2020-07-26 19:10:34
阅读次数:
69
Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two n ...
分类:
其他好文 时间:
2020-07-17 13:33:50
阅读次数:
46
题目链接:https://codeforces.com/contest/1380/problem/A 题意 给出一个大小为 $n$ 的排列,找出是否有三个元素满足 $p_i < p_j\ and\ p_j > p_k$ 。 题解 如果排列为增序或降序则无解,否则一定存在三个相邻的元素满足 $p_i ...
分类:
其他好文 时间:
2020-07-14 00:21:17
阅读次数:
67
Description Given an array of integers A, find the number of triples of indices (i, j, k) such that: 0 <= i < A.length 0 <= j < A.length 0 <= k < A.le ...
分类:
其他好文 时间:
2020-07-09 19:24:31
阅读次数:
58
index 英 [??ndeks] 美 [??ndeks] CET4 | CET6 n. 索引; <数>指数; 指示; 标志; vt. 给…编索引; 把…编入索引; [经济学]按生活指数调整(工资、价格等); vi. [机械学]转位; 变形 过去分词: indexed 复数: indices 过去式 ...
分类:
其他好文 时间:
2020-07-08 10:29:15
阅读次数:
70
集群的运行状况 GET /_cat/health?v 获取集群中的节点列表 GET /_cat/nodes?v 列出所有索引 GET /_cat/indices?v 创建索引 指定参数 PUT twitter { "settings" : { "index" : { "number_of_shard ...
分类:
其他好文 时间:
2020-07-05 00:27:57
阅读次数:
69
Range Sum Query - Immutable (E) 题目 Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. Example: Give ...
分类:
其他好文 时间:
2020-06-27 09:44:58
阅读次数:
46
获取es的基本信息 curl localhost:9200 查看当前节点的所有 Index curl -X GET 'http://localhost:9200/_cat/indices?v' 创建一个Index curl -X PUT 'localhost:9200/weather' 删除一个In ...
分类:
其他好文 时间:
2020-06-25 23:33:42
阅读次数:
80
Given an array of integers, find out whether there are two distinct indices i and j in the array such that the absolute difference between nums[i] and ...
分类:
其他好文 时间:
2020-06-25 12:23:09
阅读次数:
74