Ranom

CF1841C Ranom Numbers 题解

题意: 思路: 考虑修改同种字符: 如果要将其修改变大,修改最左侧的字符一定最优。 证明:将一个字符修改变大,自身的贡献可能增加或减少,其左侧的字符的负贡献一定增加,正贡献一定减少。考虑一左一右的两个同种字符,分别将其变大,其自身带来的贡献是相等的,但是修改靠右的字符,只会使左侧更多的字符的负贡献增 ......
题解 Numbers 1841C Ranom 1841

Educational Codeforces Round 150 (Rated for Div. 2) C. Ranom Numbers

#include <iostream> #include <string> #include <cstring> #include <algorithm> #include <cmath> using namespace std; const int N=2e5+10; typedef long l ......
Educational Codeforces Numbers Round Rated

CodeForces 1841C Ranom Numbers

[洛谷传送门](https://www.luogu.com.cn/problem/CF1841C "洛谷传送门") [CF 传送门](https://codeforces.com/problemset/problem/1841/C "CF 传送门") 先反转 $s$ 串,然后考虑 dp,设 $f_{ ......
CodeForces Numbers 1841C Ranom 1841
共3篇  :1/1页 首页上一页1下一页尾页