随笔分类 - 莫队
摘要:Problem Description There are n apples on a tree, numbered from 1 to n.Count the number of ways to pick at most m apples. Input The first line of the
阅读全文
摘要:给出一个有n个元素的数组,有以下两种操作:Q x y,求出区间[x,y)内不同元素的个数, M x y,把第x个元素的值修改为y。注意题目中的下标是从0开始的 这题超级超级坑 妈的一个水题找了几个小时的BUG 这样AC 这样WA 吃一堑长一智 妈的毒瘤啊 1 #include <bits/stdc+
阅读全文
摘要:Given a sequence of n numbers a1, a2, ..., an and a number of d-queries. A d-query is a pair (i, j) (1 ≤ i ≤ j ≤ n). For each d-query (i, j), you have
阅读全文
摘要:E. XOR and Favorite Number time limit per test 4 seconds memory limit per test 256 megabytes input standard input output standard output E. XOR and Fa
阅读全文
摘要:You come home and fell some unpleasant smell. Where is it coming from? You are given an array a. You have to answer the following queries: The Mex of
阅读全文
摘要:Given a sequence of integers a1, a2, ..., an and q pairs of integers (l1, r1), (l2, r2), ..., (lq, rq), find count(l1, r1), count(l2, r2), ..., count(
阅读全文

浙公网安备 33010602011771号