题目描述 image.png 考点 动态规划 解题思路 使用动态规划:我们从左上角到右下角进行一次动态搜索,再从右下到左上进行一次动态搜索。两次动态搜索即可完成四个方向的查找; 解题思路.png 代码实现 class Solution { public: vector<vector<int>> up ...
分类:
其他好文 时间:
2020-12-04 11:00:34
阅读次数:
4
题目:https://leetcode-cn.com/problems/ju-zhen-zhong-de-lu-jing-lcof/submissions/ 代码: class Solution { public boolean exist(char[][] board, String word) ...
分类:
其他好文 时间:
2020-12-03 12:21:11
阅读次数:
6
题目 74. 搜索二维矩阵 思路1(暴力) 遍历二维数组的所有的元素,看看是否存在target 代码 class Solution { public boolean searchMatrix(int[][] matrix, int target) { for (int i = 0; i < matr ...
分类:
其他好文 时间:
2020-12-03 11:50:12
阅读次数:
4
此博客连接:https://www.cnblogs.com/ping2yingshi/p/14054440.html 存在重复元素2 题目链接:https://leetcode-cn.com/problems/contains-duplicate-ii/submissions/ 题目 给定一个整数数 ...
分类:
其他好文 时间:
2020-12-03 11:48:40
阅读次数:
2
快排与TopK 问题都可以用partition解决,所以这里将两者放在一起进行总结 topK 问题 #include<vector> #include<iostream> #include<algorithm> using namespace std; class Solution{ public: ...
分类:
其他好文 时间:
2020-12-02 12:25:31
阅读次数:
4
problem 给出 \(n\) 个互不包含的字符串,要求你求出一个最短的字符串 \(S\),使得这 \(n\) 个字符串在 \(S\) 中总共至少出现 \(m\) 次,问 \(S\) 最短是多少。 solution 我们首先转化题意: 有 \(n\) 个点,两个点 \(i,j\) 之间的权值为将第 ...
分类:
其他好文 时间:
2020-12-02 11:59:30
阅读次数:
3
call 有一个非常 \(\text{Naive}\) 的 \(O(nQ)\) 暴力,把类型 $1,2$ 的函数直接合并到类型 $3$ 上,对于 $2$ 函数直接乘,对于 $1$ 函数计算 $2$ 函数对 $1$ 函数的贡献,将单点加的数对 \((x,y)\) 记录在类型 $3$ 的函数的 \(\t ...
分类:
其他好文 时间:
2020-12-01 12:23:03
阅读次数:
5
### Snort实验 一.实验环境 操作系统:ubuntu18.04、Kali 实验工具:snort、vmware workstation 1号机IP:192.168.204.131 2号机IP:192.168.204.132 二.实验内容 在进行Snort配置前需要搭建实验环境,实验所需的环境配 ...
分类:
其他好文 时间:
2020-11-30 16:04:05
阅读次数:
6
一.平台方式: [DESCRIPTION]?关于LCM旋转180度,MTK提供一种新的方法,通过硬件OVL来实现。该方法会影响同一份load中的所有屏。 [SOLUTION] 配置方法: LK中: bootable/bootloader/lk/project/$project.mk MTK_LCM_ ...
分类:
其他好文 时间:
2020-11-30 16:01:41
阅读次数:
9
###题目 1287. Element Appearing More Than 25% In Sorted Array ###解题方法 遍历数组,找到出现次数最多的那个数即可。 时间复杂度:O(n) 空间复杂度:O(1) ###代码 class Solution: def findSpecialIn ...
分类:
移动开发 时间:
2020-11-30 15:53:35
阅读次数:
10