首页
DreamJudge
院校信息
考研初试
考研复试
保研专区
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
besti
2026年3月7日 09:18
种树2 题解:贪心
P801
回复 0
|
赞 0
|
浏览 45
区间调度 + 优先从后往前种 #include <iostream> using namespace std; #include <vector> #include <algorithm> struct suggestion { int start; int end; int tree; }; bool cmp(suggestion s1, suggestion s2) { return s1.end &l...
快乐小土狗
2026年2月12日 17:24
种树2 题解:贪心
P801
回复 0
|
赞 1
|
浏览 142
#include <iostream> #include <algorithm> using namespace std; int l[30005], ans; struct sug { int b, e, t; } su[5005]; bool cmp(sug a, sug b) { return a.e < b.e; } int main() { int n, h; cin >> n >> h; for (int i = 1; i <= h; i++)...
题目
种树2
题解数量
2
发布题解
在线答疑
热门题解
1
种树2 题解:贪心
2
种树2 题解:贪心