2697

[LeetCode] 2697. Lexicographically Smallest Palindrome

You are given a string s consisting of lowercase English letters, and you are allowed to perform operations on it. In one operation, you can replace a ......

Luogu P2697 宝石串

## 题目 [link](https://www.luogu.com.cn/problem/P2697) ## 思路 将字符串中 $G$ 换为 $-1$, $R$ 换为 $1$, 进行前缀和处理, 若和为 $0$, 则为稳定的宝石串,比较记录最大值 ## Code ```cpp #include u ......
Luogu P2697 2697
共2篇  :1/1页 首页上一页1下一页尾页