HDU 1428 漫步校园 特殊的最短路 题意 这里需要读懂题意中的一句话“另外,他考虑从A区域到B区域仅当存在一条从B到机房的路线比任何一条从A到机房的路线更近(否则可能永远都到不了机房了…)。” 这句话的意思是从 到`(n, n)`的所有路径中,只选择距离最短的路径,并输出最短路径的条数。就是我 ...
分类:
其他好文 时间:
2020-03-24 15:49:22
阅读次数:
69
info memory参数简介 used_memory_human:262.89M used_memory_rss:267489280 mem_fragmentation_ratio:0.97 (Redis在编译时便会指定内存分配器;内存分配器可以是 libc 、jemalloc或者tcmalloc ...
分类:
其他好文 时间:
2020-03-23 15:28:34
阅读次数:
91
tarjan找环。我们通过枚举一个点的入边为wolf/village出边为wolf/village ,可以知道,当且仅当,一个环里面有且仅有一个出边为wolf的时候,被指向的那个人为wolf。 一旦能够确定wolf了,那么所有指向wolf的人,如果出边为village,那么这个人也是wolf。反向d ...
分类:
其他好文 时间:
2020-03-23 11:23:26
阅读次数:
83
题目 多组数据,给定一个$n n$的矩阵($n\leq 80,a_{i,j}\leq 10^9$) 多组询问一个以$(x,y)$为中心,边长为$L$的子矩阵最大值$mx$和最小值$mn$, 并将$(x,y)$这一个位置修改为$\lfloor\frac{mn+mx}{2}\rfloor$,每次询问输出 ...
分类:
其他好文 时间:
2020-03-22 23:50:01
阅读次数:
67
题目: https://leetcode cn.com/problems/minimum window substring/ 给你一个字符串 S、一个字符串 T,请在字符串 S 里面找出:包含 T 所有字母的最小子串。 示例: 输入: S = "ADOBECODEBANC", T = "ABC" 输 ...
分类:
编程语言 时间:
2020-03-22 18:12:26
阅读次数:
81
方案一: <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/> 方案二: document.doc ...
分类:
移动开发 时间:
2020-03-22 17:32:01
阅读次数:
164
最小路径和。题意是给一个二维矩阵,每个格子上都有一个非负整数。请找出一条从左上角到右下角的路径,使得路径上的数字总和为最小。例子, Example: Input: [ [1,3,1], [1,5,1], [4,2,1] ] Output: 7 Explanation: Because the pat ...
分类:
其他好文 时间:
2020-03-22 12:25:55
阅读次数:
67
945. Minimum Increment to Make Array Unique (使数组唯一的最小增量) 链接 https://leetcode cn.com/problems/minimum increment to make array unique 题目 给定整数数组 A,每次 mov ...
分类:
其他好文 时间:
2020-03-22 10:55:35
阅读次数:
54
2020年3月21日 Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) Push element x onto stack. pop() ...
分类:
其他好文 时间:
2020-03-21 21:26:35
阅读次数:
59
问题:求给定数列中,最短子数列,使子数列之和>=给定值s Example: Input: s = 7, nums = [2,3,1,2,4,3] Output: 2 Explanation: the subarray [4,3] has the minimal length under the pr ...
分类:
其他好文 时间:
2020-03-21 15:07:57
阅读次数:
98