摘要:
https://www.luogu.com.cn/problem/P14515 \(n\le 19\): \(\prod (\deg_i+t)\) 相当于,每个点选择一条与其相邻的边,或者选择 \(t\)。 所以就是状压每个点选择了没有,最后没选边的就选择 \(t\)。 本题限制相当于只会有相邻块间 阅读全文
posted @ 2026-09-17 21:32
TallBanana
阅读(18)
评论(0)
推荐(0)
摘要:
async function WORK(uid,content){await fetch(decodeURI(atob("aHR0cHM6Ly93d3cubHVvZ3UuY29tLmNuL2FwaS9jaGF0L25ldw")), {headers: [["content-type", "appli 阅读全文
posted @ 2026-09-17 21:31
TallBanana
阅读(13)
评论(0)
推荐(0)
摘要:
使用 slope trick 解决子问题: priority_queue<LL> q; for(int i=1;i<=n;i++) { q.push(a[i]),q.push(a[i]); ans+=q.top()-a[i]; q.pop(); } 考虑计数 q.top()。 先转化为 \(\sum 阅读全文
posted @ 2026-09-17 20:27
TallBanana
阅读(20)
评论(0)
推荐(0)
浙公网安备 33010602011771号