随笔分类 - 蒙题之路
摘要:题目描述: H. Maximal GCD time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output 题目描述: H. Maximal GCD
阅读全文
摘要:题目描述: Description This task is very simple. Given a string S of length n and q queries each query is on the format i j k which means sort the substrin
阅读全文
摘要:题目描述: A Simple Task time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Given a simple graph
阅读全文
摘要:题目描述: B. Shaass and Bookshetime limit per test 2 secondsmemory limit per test 256 megabytesinput standard inputoutput standard outputShaass has n book
阅读全文
摘要:题目描述: 输入输出: 输入样例:
阅读全文
摘要:题目描述: 墨墨购买了一套N支彩色画笔(其中有些颜色可能相同),摆成一排,你需要回答墨墨的提问。墨墨会向你发布如下指令: 1、 Q L R代表询问你从第L支画笔到第R支画笔中共有几种不同颜色的画笔。 2、 R P Col 把第P支画笔替换为颜色Col。 为了满足墨墨的要求,你知道你需要干什么了吗?
阅读全文
摘要:题目描述: Problem DescriptionAn array of positive integers a1, a2, ..., an is given. Let us consider its arbitrary subarray al, al + 1..., ar, where 1 ≤ l
阅读全文
摘要:题目描述: D. Interesting Arraytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputWe'll call an array of
阅读全文
摘要:题目描述: In this problem we consider a very simplified model of Barcelona city.Barcelona can be represented as a plane with streets of kind x=cx=c and y=
阅读全文
摘要:题目描述: C. Neko does Maths time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output C. Neko does Mat
阅读全文
摘要:题目描述: time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are preparing for an exam on schedulin
阅读全文
摘要:思路: 刚开始: 利用map来统计长度为k的一段上的数字及其出现次数,不断更新区段位置,减去退出区段的数字的出现次数,加上新出现的数字及其出现次数,每次都从后向前遍历一遍map,如果遇到一个数且出现次数为1,那么他就是当前区段上的最大数(因为map中已排好序),break,当前循环结束。这种方法果然
阅读全文
摘要:题目描述: 知识点: lower_bound和uper_bound lower_bound(起始地址,结束地址,要查找的数值) 返回的是数值 第一个 出现的位置。 upper_bound(起始地址,结束地址,要查找的数值) 返回的是数值 最后一个 出现的位置。 binary_search(起始地址,
阅读全文

浙公网安备 33010602011771号