摘要:
https://www.luogu.com.cn/problem/P1147暴力,模拟,枚举橙色题 思路: 大暴力代码: #include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> # 阅读全文
posted @ 2022-08-06 12:33
-イレイナ
阅读(39)
评论(0)
推荐(0)
摘要:
https://www.luogu.com.cn/problem/P3111模拟,贪心黄色题 思路: 只要在一开始算出所有牛的最终位置,并从后往前比对即可 如果前一头牛的最终位置达不到后一头牛,则res++ 否则,将前一头牛的位置设置成和后一头牛相同 ######注意,这里t的大小达到了10^9,因 阅读全文
posted @ 2022-08-06 12:01
-イレイナ
阅读(44)
评论(0)
推荐(0)
摘要:
https://www.luogu.com.cn/problem/P1294搜索,DFS黄色题 思路: 1.枚举每一个起点,找到最长相伴的一条路程 2.要注意判断死路的情况 #include<bits/stdc++.h> using namespace std; int n,m; int mp[25 阅读全文
posted @ 2022-08-06 11:53
-イレイナ
阅读(61)
评论(0)
推荐(0)

浙公网安备 33010602011771号