摘要:
multiset 可重复元素的$set$。 定义: struct nd{ int x; friend bool operator ()(nd x,nd y){return x.x < y.x;}//可自定义比较 }; multiset<nd> tree; 操作: auto it = tree.beg 阅读全文
posted @ 2022-09-08 16:11
RiverSheep
阅读(16)
评论(0)
推荐(0)
摘要:
$\text{Solution}$ 一道简单的$DP$,没有需要转弯的地方,思路较为顺畅。 考虑每一位的填法是独立的,设$f_{i,0/1/2/3}$表示填到第$i$位,当前的状态为$s < w$或$s > w$或$s = w$或$s$和$w$不可比。易得转移 $$f[i][0] = f[i - 1 阅读全文
posted @ 2022-09-08 16:10
RiverSheep
阅读(19)
评论(0)
推荐(0)

浙公网安备 33010602011771号