摘要: "863F Almost Permutation" 题意 给出每个位置可以放的数字的范围,定义 $cost = \sum_{i=1}^{n}(cnt(i))^2$ ,其中 $cnt(i)$ 为数字 $i$ $(1 \leq i \leq n)$ 出现的次数。将每个位置都填上一个数字,求 $cost$ 阅读全文
posted @ 2017-09-30 12:28 ftae 阅读(351) 评论(0) 推荐(0) 编辑