摘要: 题意:给定一个长度为 n 的非负数列,定义 mex(l, r) 为 l,r 区间里最小的没有出现的数字。求所有 mex(l, r) 的和分析参见http://www.shuizilong.com/house/archives/hdu-4747-mex/我的代码:1#include2#include3#include4#include5typedeflonglongll;6#definelsonl,mid,rt>1;35build(lson);36build(rson);37Up(seg[rt],seg[rt>1))*fa.setv;44rs.sum=(ll)(len>> 阅读全文
posted @ 2013-09-18 20:20 masterhe 阅读(366) 评论(0) 推荐(0) 编辑