摘要: Description给出了一个序列,你需要处理如下两种询问。"Cabc"表示给[a, b]区间中的值全部增加c(-10000≤c≤10000)。"Qab"询问[a, b]区间中所有值的和。Input第一行包含两个整数N,Q。1≤N,Q≤100000.第二行包含n个整数,表示初始的序列A(-1000... 阅读全文
posted @ 2015-08-11 16:17 pb2016 阅读(293) 评论(0) 推荐(2) 编辑
摘要: DescriptionThe inversion number of a given number sequence a1, a2, ..., an is the number of pairs (ai, aj) that satisfy i aj.For a given sequence of ... 阅读全文
posted @ 2015-08-11 16:12 pb2016 阅读(204) 评论(0) 推荐(1) 编辑