题解 2577: 蓝桥杯2020年第十一届省赛真题-走方格 摘要:解题思路:利用记忆化递归进行搜索注意事项:注意将终点dp[n][m]设为1参考代码:#pragma GCC optimize(1) #pragma GCC optimize(2) #pragma …… 题解列表 2022年03月12日 0 点赞 0 评论 258 浏览 评分:0.0
暴力做法!!! 摘要:```cpp #include using namespace std; int n, m, ans = 0; const int N = 40; //行号和列号都是偶数不能步入当前…… 题解列表 2022年03月22日 0 点赞 0 评论 242 浏览 评分:0.0
简洁暴力的dfs就可以了 摘要:方向只要向下和向右,不需要开数组保存走过的路,数据量这么小,直接暴力就行#include<bits/stdc++.h>using namespace std;int n,m;long long ans…… 题解列表 2023年04月01日 1 点赞 1 评论 163 浏览 评分:0.0
走方格,dfs 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstdio>#include<algorithm>#include<cmath>#include<cstring>…… 题解列表 2022年02月21日 0 点赞 0 评论 313 浏览 评分:4.0
#C++2577——蓝桥杯2020年第十一届省赛真题-走方格(递归求解) 摘要:解题思路:用递归去遍历所有可能,对于正确的可能返回1,最后返回所有正确的情况注意事项:注意递归的调用条件参考代码:#include using namespace std; int m,n; in…… 题解列表 2022年07月25日 0 点赞 1 评论 391 浏览 评分:7.5
优质题解 蓝桥杯2020年第十一届省赛真题-走方格【DFS/DP】 摘要:按照dfs模板套着套着,写着写着,就出来了 ```cpp #include #include using namespace std; int n,m; int vis[30][30]…… 题解列表 2022年03月12日 0 点赞 0 评论 960 浏览 评分:9.9
dfs!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 摘要:```cpp #include using namespace std; string s1; int arr[100][100]; int vis[100][100] = {0}; in…… 题解列表 2022年03月13日 0 点赞 0 评论 261 浏览 评分:9.9
简单的动态规划 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int dp[40][40] = {0}; int n,m…… 题解列表 2022年03月22日 0 点赞 0 评论 294 浏览 评分:9.9
dp easy 题(简单题) 摘要:解题思路:注意事项:参考代码://方法dp 时间复杂度o(n*m) 空间复杂度o(n*m),1<=n<=m<=30,最大900次,时间戳戳有余,空间戳戳有余 #include<iostream> …… 题解列表 2022年03月28日 0 点赞 0 评论 267 浏览 评分:9.9
2577: 蓝桥杯2020年第十一届省赛真题-走方格 摘要:解题思路:这题典型的dfs注意事项:参考代码:#include<bits/stdc++.h> using namespace std; int sum=0; int n,m; void dfs…… 题解列表 2022年04月03日 0 点赞 0 评论 261 浏览 评分:9.9