随笔分类 - Codeforces
摘要:E Boring Segments 双指针加线段树; 线段树维护区间覆盖问题,具体来说每个节点维护区间被完整覆盖的最小次数; 先将线段按照权值从小到大排序,seg[i]指下标i所对应的线段; 对于双指针l,r来说,r向右移的同时将seg[r]对应的线段覆盖,直到覆盖掉整个区间[1,m],此时再右移l
阅读全文
摘要:A. Boboniu Likes to Color Balls Boboniu gives you r red balls, g green balls, b blue balls, w white balls. He allows you to do the following operation
阅读全文
摘要:A. Donut Shops There are two rival donut shops. The first shop sells donuts at retail: each donut costs a dollars. The second shop sells donuts only i
阅读全文
摘要:A. Shovels and Swords Polycarp plays a well-known computer game (we won't mention its name). In this game, he can craft tools of two types — shovels a
阅读全文

浙公网安备 33010602011771号