Decreasing

CF1886C Decreasing String 题解

Problem - C - Codeforces Decreasing String - 洛谷 p.s. 本题提到的所有 \(s_i\) 的 \(i\) 均表示 \(s\) 字符串的下标,而不是第 \(i\) 个字符串。因为我懒不想改了 每次遇到这种题都想不到最好的解决方法,我是不是应该把所有比赛的 ......
题解 Decreasing String 1886C 1886

C. Decreasing String

C. Decreasing String Recall that string $a$ is lexicographically smaller than string $b$ if $a$ is a prefix of $b$ (and $a \ne b$), or there exists an ......
Decreasing String

CF1886C Decreasing String 题解

题面 \(S_n\) 由 \(S_{n-1}\) 去掉一个字母得到,\(S=S_1+S_2+...+S_n\) 给定 \(S_1\) 求 \(S\) 的第 \(N\) 位 solution 我们先考虑怎样去字母能保持字典序最小 显然,我们发现如果一个字母比前面那个字母小,那么我们就要删除前面那个字母 ......
题解 Decreasing String 1886C 1886

[LeetCode] 2863. Maximum Length of Semi-Decreasing Subarrays_Medium tag: stack

You are given an integer array nums. Return the length of the longest semi-decreasing subarray of nums, and 0 if there are no such subarrays. A subarr ......

CF1886C Decreasing String

单调栈的应用。 显然可以 \(O(n)\) 地找到 \(pos\) 所属的 \(s_i\) 段,所以我们只需要得到 \(s_i\) 即可。不难发现,删除元素的规则应该是从 \(1\) 到 \(n\) 枚举每个元素,删除它前面“紧邻的”比他大的元素(例如对于 eadcb 中的 b 删除掉 dc)。 赛 ......
Decreasing String 1886C 1886 CF

CF1864A Increasing and Decreasing

## 思路 首先,给定了一个序列的首项 $a_1$ 和末项 $a_n$ 以及项数 $n$,要求构造一个严格递增,且差严格递减的序列。 因为是构造题,所以可以随便造,考虑差严格递减,所以从后往前构造比较合理。 因为严格递增,所以差至少为 $1$,所以 $a_{n-1}$ 就构造成 $a_n-1$,$a ......
Increasing Decreasing 1864A 1864 and

CodeForces 1839E Decreasing Game

[洛谷传送门](https://www.luogu.com.cn/problem/CF1839E "洛谷传送门") [CF 传送门](https://codeforces.com/problemset/problem/1839/E "CF 传送门") 不会,不知道该如何评价。确实是自己的问题。 这种 ......
CodeForces Decreasing 1839E 1839 Game
共7篇  :1/1页 首页上一页1下一页尾页