Educational Codeforces Round 76 (Rated for Div. 2) E. The Contest(dp+线段树) 题目链接 题意: 给定3个人互不相同的多个数字,可以把数字移动给别人,问最少移动几次后可以使第一个人的数字为1~m1,第二个人m1~m2,第三个 ...
传送门: E. Count The Blocks 题意:给你一个整数n,求 n内 每个数有前导零 长度为 到n的块分别有多少个。块的含义是连续相同数字的长度。 题解:从n 开始枚举,ans数组记录每个长度的块的个数。当前的ans n 的值就是下一个n 后的ans n 的值,这样每次只用算长度为 的块有多少个就好了。为了方便,将ans数组倒过来记录。长度为 的块实际上就是总数字个数减去长度为 n所含 ...
2020-03-24 01:23 0 601 推荐指数:
Educational Codeforces Round 76 (Rated for Div. 2) E. The Contest(dp+线段树) 题目链接 题意: 给定3个人互不相同的多个数字,可以把数字移动给别人,问最少移动几次后可以使第一个人的数字为1~m1,第二个人m1~m2,第三个 ...
题目链接:http://codeforces.com/contest/1389/problem/E 大概题意:某个国家一年有m个月,每个月有d天,一个星期有w天。(x,y)且(x<y),表示x月y天,如果x月y天和y月x天是一周中的同一天,则(x,y)是好的,问你第一年中有多少个好 ...
[Educational Codeforces Round 81 (Rated for Div. 2)]E. Permutation Separation(线段树,思维,前缀和) E. Permutation Separation time limit per test 2 seconds ...
E. Editor The development of a text editor is a hard problem. You need to implement an extra module for brackets coloring in text. Your editor ...
Codeforces Round #600 (Div. 2) E. Antenna Coverage(dp) 题目链接 题意: m个Antenna,每个Antenna的位置是$x_i$,分数是$s_i$,覆盖范围是$[x_i - s_i; x_i + s_i]$,每个硬币可以使一个 ...
E. Prefix Enlightenment time limit per test3 seconds memory limit per test256 megabytes There are n lamps on a line, numbered from 1 to n. Each one ...
最近省队前联考被杭二成七南外什么的吊锤得布星,拿一场Div. 2恢复信心 然后Div.2 Rk3、Div. 1+Div. 2 Rk9,rating大涨200引起舒适 现在的Div. 2都怎么了,最 ...
A. Two Rival Students B. Magic Stick C. Dominated Subarray Description 给出一个序列串,求满足下述要求的最短子串序列。 ...