摘要:小Q的妈妈是一个出纳,经常需要做一些统计报表的工作。今天是妈妈的生日,小Q希望可以帮妈妈分担一些工作,作为她的生日礼物之一。经过仔细观察,小Q发现统计一张报表实际上是维护一个可能为负数的整数数列,并且进行一些查询操作。在最开始的时候,有一个长度为N的整数序列,并且有以下三种操作: INSERT i
阅读全文
摘要:超级坑的水题!!!想了两天没一点思路,看了题解第一段话就做出来了 刚开始一直在想找到通项就是例如an*10^n+...+a0*10^0-an-...-a0>=s,然后从这个里面找到规律,结果走进死胡同了 Let's prove that if x is really big, then x + 1
阅读全文
摘要:The SUM problem can be formulated as follows: given four lists A, B, C, D of integer values, compute how many quadruplet (a, b, c, d ) ∈ A x B x C x D
阅读全文
摘要:D. Mike and distribution time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Mike has always
阅读全文
摘要:D. k-Interesting Pairs Of Integers time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output D. k-
阅读全文