Potions

E. Nastya and Potions

E. Nastya and Potions 思路:直接对比制造这份药剂和直接买那个更好 判断特殊: 1.如果已经拥有就不用再买了 2.如果只能买,就直接买 方法: 1.dfs,因为要制造3,可能先要制造1,这样我们就dfs把条件从叶子节点全都往上传就行 优化: 1.如果之前已经知道了制造的价格,那么 ......
Potions Nastya and

[题解] CF1526C2 Potions

# CF1526C2 Potions 题目知识点:反悔贪心。 [题目传送门](https://codeforces.com/contest/1526/problem/C2) ## 题意 给定 $n$ 瓶药水,喝下药水 $i$ 可以给生命增加 $a_i$ ,现在要求你按照从 $1$ 到 $n$ 的顺序 ......
题解 Potions 1526C 1526 CF

[LeetCode] 2300. Successful Pairs of Spells and Potions

You are given two positive integer arrays spells and potions, of length n and m respectively, where spells[i] represents the strength of the ith spell ......
Successful LeetCode Potions Spells Pairs
共3篇  :1/1页 首页上一页1下一页尾页