
图
AKalone
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
LeetCode 329 矩阵中的最长递增路径
矩阵中的最长递增路径 题目 思路 记忆化搜索,第一次接触,参考Java答案后,自己写的C++,dfs函数数组要用&,超内存很多次。 代码 class Solution { public: int dx[4]={0,1,0,-1}; int dy[4]={1,0,-1,0}; int n,m,x,y; int longestIncreasingPath(ve...原创 2019-11-20 00:11:47 · 185 阅读 · 0 评论 -
Codeforces-242C King's Path
King’s Path 题目 样例 思路 把允许走的路标记为-1(方便最后输出),然后做八个方向的BFS。 代码 #include<iostream> #include<queue> #include<map> using namespace std; int x0,y0,x1,y1,n; queue<pair<int,int> > ...原创 2019-11-10 23:15:45 · 186 阅读 · 0 评论