双指针
文章平均质量分 61
sakura7776
文化先和初中生同步
展开
-
CF1744F 每日一题 MEX vs MED 思维,双指针
outputstandard outputYou are given a permutation p1,p2,…,pn of length n of numbers 0,…,n−1. Count the number of subsegments 1≤l≤r≤n of this permutation such that mex(pl,pl+1,…,pr)>med(pl,pl+1,…,pr).mex of S is the smallest non-negative integer th原创 2023-02-02 14:05:57 · 293 阅读 · 0 评论 -
CF1765D 每日一题 Watch the Videos
Monocarp wants to watch n videos. Each video is only one minute long, but its size may be arbitrary. The i-th video has the size ai megabytes. All videos are published on the Internet. A video should be downloaded before it can be watched. Monocarp has原创 2023-01-25 16:54:22 · 178 阅读 · 0 评论