当前位置:网站首页>【学习笔记】搜索
【学习笔记】搜索
2022-06-28 08:06:00 【仰望星空的蚂蚁】
搜索(x)
思维(v)
Koala and Notebook
idea 海星。
考虑拆边使得每条边的权值为 [0,9] 。
然后用类似桶排序的做法 BFS 即可。
Limak and Shooting Points
神仙题。
考虑全排列开枪顺序 。然后按照这个顺序开枪打即可。注意是倒序枚举,每一枪已知的是最终打到哪个 monster ,那么对于路径上的障碍物则用递归处理。
考试应该想不出来这么秒的方法。
这题给我们的启发是:巧妙的暴力,从不同方式切入,搜索难度差别很大。
Super Jaber
解法似乎并不容易观察到。
考察路径分为两种:
- 不经过任何 “传送门” ,相当于直接曼哈顿距离 。
- 经过某个颜色的传送门,那么我们可以枚举颜色,作为 “中转站”
只需预处理出 d p [ i ] [ x ] [ y ] dp[i][x][y] dp[i][x][y] 表示从颜色为 i i i 的任意起点出发到 ( x , y ) (x,y) (x,y) 的最短距离即可。方法是显然的。
这道题非常考验观察能力。
Playoff Restoration
idea 海星 。
meet in the middle + 暴力 + 模拟
边栏推荐
猜你喜欢

Redis implements distributed locks

ZYNQ_ IIC read / write m24m01 record board status

The solution of "user account control to continue, please enter administrator user name and password" appears in win10 Professional Edition

Application of XOR. (extract the rightmost 1 in the number, which is often used in interviews)

三角变换公式

GPIO configuration of SOC

图像翻译/Transformer:ITTR: Unpaired Image-to-Image Translation with Transformers用Transfor进行非配对图像对图像的转换

Redis cerebral fissure

Generation and verification of JWT token

Section Xi. Axi of zynq_ Use of DMA
随机推荐
Vagrant installation
How redis solves cache avalanche, breakdown and penetration problems
HJ explicit random number
22/02/14 study notes
Ambari (VI) -- ambari API use
Sentinel mechanism of redis cluster
Airflow2.1.1 summary of the pits stepped on in actual combat!!
LeetCode之三步问题
B_QuRT_User_Guide(30)
Jenkins' common build trigger and hook services (V)
Image translation /transformer:ittr: unpaired image to image translation with transformers
[shangpinhui] project notes
Application of XOR. (extract the rightmost 1 in the number, which is often used in interviews)
你了解TCP协议吗(二)?
2022第六季完美童模 佛山赛区 初赛圆满落幕
Is it reliable to open a new bond registration account? Is it safe?
Update pip to the latest version
SLAM中常用的雅克比矩阵J
SOC serial port configuration
Installing redis on Linux