LC148 two-sum 题意:数组中找出两个加起来等于目标值的数 题解:unordered存值对应下标,注意相同数的特判 LC147 median-of-two-sorted-arrays 题意:两个有序数组中位数 题解:Kth(A,m,B,n,k),若m>n交换,pa=min(k/2,m),p ...
分类:
其他好文 时间:
2020-07-10 15:23:31
阅读次数:
60
package LeetCode_680 /** * 680. Valid Palindrome II * https://leetcode.com/problems/delete-operation-for-two-strings/description/ * * Given two words ...
分类:
其他好文 时间:
2020-07-10 09:29:42
阅读次数:
68
#Code-Output File-Two Way July 9, 2020 9:25 PM ##1.使用ofstream 输出 #include <fstream> SYSTEMTIME st; GetLocalTime(&st); CString strTime; strTime.Format( ...
分类:
其他好文 时间:
2020-07-09 22:11:03
阅读次数:
73
如果只有一次询问,可以分治,每次考虑跨过中点的情况。预处理左半边后缀or和,右半边前缀or和,然后用two pointers求。发现前、后缀or和只会变化O(log a)次。用线段树维护,记录每个区间的答案,以及前、后缀or和(这O(log a)个段)。push_up和查询时,还用two point... ...
分类:
其他好文 时间:
2020-07-08 23:21:12
阅读次数:
78
You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents water. Grid cells are connected horizontally/ve ...
分类:
其他好文 时间:
2020-07-08 09:14:32
阅读次数:
54
@ PointXYZ——成员变量: float x, y, z; PointXYZ是使用最常见的一个点数据类型,因为它只包含三维xyz坐标信息,这三个浮点数附加一个浮点数来满足存储对齐,用户可利用points[i].data[0],或者points[i].x访问点的x坐标值。 union { flo ...
分类:
其他好文 时间:
2020-07-06 20:07:02
阅读次数:
91
Algorithm: 70: Climbing Stairs (Easy) 167: Two Sum II - Input array is sorted (Easy) 120: Triangle (Medium) 经典动态规划,状态转移方程是自底向上,row[i] = row[i] + min(p ...
分类:
其他好文 时间:
2020-07-05 17:18:19
阅读次数:
70
#一、论文相关信息 我看的论文是Fuzzing File Systems via Two-Dimensional Input Space Exploration,本文发表在IEEE Symposium on Security and Privacy 2019,第一作者Wen Xu,导师Taesoo ...
分类:
其他好文 时间:
2020-07-05 17:16:24
阅读次数:
51
[JavaScript 中文开发手册generator.next (Generator) - JavaScript 中文开发手册The next() method returns an object with two properties done and value. You can also p... ...
分类:
编程语言 时间:
2020-07-05 12:06:10
阅读次数:
122
1.特点: 有序, 在set的基础上,增加了一个值 2.常用命令:命令 以 z开头 my-redis:0>zadd myset 1 one ############### zadd 添加一个值 1 my-redis:0>zadd myset 2 two 1 my-redis:0>zadd myset ...
分类:
其他好文 时间:
2020-07-05 00:15:25
阅读次数:
127