dilingtian
dilingtian
全部文章
题解
归档
标签
去牛客网
登录
/
注册
山理小霸王
lalala
全部文章
/ 题解
(共2篇)
题解 | #[NOIP2007]守望者的逃离#
dpdpdp做法,先全用魔法更新一遍动态数组,然后再加入常规走法更新 AC代码 #include <bits/stdc++.h> using namespace std; const int N = 1e6; int dp[N]; int main(void) { int m, s, ...
动态规划
贪心
2022-11-29
1
379
题解 | #[USACO 2007 Jan S]Protecting the Flowers#
贪心: 假设如果有两头牛,往返的时间分别是tit_iti,每分钟摧毁的花是did_idi。 那么我们可以得出: 1.先牵第一头牛,消耗的总数为t1∗d2t_1*d_2t1∗d2 2.先牵第二头牛,消耗的总数为t2∗d1t_2*d_1t2∗d1 我们使第一种情况消耗总数最小,可以列出t1∗...
贪心
排序
2022-11-16
1
372