摘要:
题目: https://www.luogu.com.cn/problem/P2678 第一行包含三个整数 L,N,ML,N,M,分别表示起点到终点的距离,起点和终点之间的岩石数,以及组委会至多移走的岩石数。保证 L \geq 1L≥1 且 N \geq M \geq 0N≥M≥0。 接下来 NN 行 阅读全文
posted @ 2021-07-16 20:57
废柴废柴少女
阅读(62)
评论(0)
推荐(0)
摘要:
dfs+剪枝 #include<stdio.h> #include<algorithm> using namespace std; typedef long long ll; ll f[1007],s[1007]; ll ans=0; int n; ll c; void dfs(int index, 阅读全文
posted @ 2021-07-16 15:06
废柴废柴少女
阅读(32)
评论(0)
推荐(0)
摘要:
https://www.luogu.com.cn/problem/P1605#submit dfs ,初始位置的v要标记 bfs在用d[ ]判断能不能到达时是要把起点拿出来单独 搜索https://www.luogu.com.cn/training/85494#problems 阅读全文
posted @ 2021-07-16 11:22
废柴废柴少女
阅读(97)
评论(0)
推荐(0)
浙公网安备 33010602011771号