摘要: 传送门 题目 有一个长度为n的数组{a1,a2,…,an}。m次询问,每次询问一个区间内最小没有出现过的自然数。 输入格式: 第一行n,m。 第二行为n个数。 从第三行开始,每行一个询问l,r。 输出格式: 一行一个数,表示每个询问的答案。 分析 就是一个朴素的莫队题,虽然这个做法复杂度有问题(雾, 阅读全文
posted @ 2018-06-17 09:43 水题收割者 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 传送门 题目 In one well-known algorithm of finding the k-th order statistics we should divide all elements into groups of five consecutive elements and fin 阅读全文
posted @ 2018-06-17 08:20 水题收割者 阅读(404) 评论(0) 推荐(0) 编辑