Spells

Two Types of Spells

贪心题,先假设全部都是w[i],然后你发现最多可以放电之咒个数的两倍,贪心加上这么多w[i](从大到小),但是你发现不能全是电之咒。 后面的限制不好用数据结构维护,考虑让数据结构维护的东西天然满足这个限制,那么直接删去一个电之咒然后选就行了。 那么肯定删去最小的电之咒。 维护的东西有: \[\sum ......
Spells Types Two of

CF1398E Two Types of Spells 题解 set

题目链接:[https://codeforces.com/problemset/problem/1398/E](https://codeforces.com/problemset/problem/1398/E) ### 题目大意 你有一个集合,初始为空。 有两种类型的元素,一种是普通元素,一种是强化 ......
题解 Spells 1398E Types 1398

[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下一页尾页