摘要:
题目链接DescriptionBessie has gone to the mall's jewelry store and spies a charm bracelet. Of course, she'd like to fill it with the best charms possible from theN(1 ≤N≤ 3,402) available charms. Each charmiin the supplied list has a weightWi(1 ≤Wi≤ 400), a 'desirability' factorDi(1 ≤Di≤ 阅读全文
摘要:
题目链接DescriptionA train has a locomotive that pulls the train with its many passenger coaches. If the locomotive breaks down, there is no way to pull the train. Therefore, the office of railroads decided to distribute three mini locomotives to each station. A mini locomotive can pull only a few passe 阅读全文
摘要:
题目链接线段树解法#include #include using namespace std;const int maxn = 100010;struct node{ int l, r, mid, minn;}tree[maxn> 1; tree[o].mid = m; if (l == r) { tree[o].minn = a[l]; return ; } build(l, m, o tree[o].mid) return query(l, r, (o#include using namespace std;co... 阅读全文