Solutions are presented as using the least memory and the fastest execution time. It also takes the top 10 most recent solutions from each language. If you want to limit to a specific index, click the "Solved" button and go to that problem.
ContestId |
Name |
Phase |
Frozen |
Duration (Seconds) |
Relative Time |
Start Time |
---|---|---|---|---|---|---|
1506 | Codeforces Round 710 (Div. 3) | FINISHED | False | 7200 | 115140299 | March 25, 2021, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 4379 ) | G | Maximize the Remaining String | PROGRAMMING | brute force data structures dp greedy strings two pointers |
B'You are given a string s , consisting of lowercase Latin letters. While there is at least one character in the string s that is repeated at least twice, you perform the following operation: For example, if s= "codeforces", then you can apply the following sequence of operations: Given a given string s , find the lexicographically maximum string that can be obtained after applying a certain sequence of operations after which all characters in the string become unique. A string a of length n is lexicographically less than a string b of length m , if: For example, the string a= "aezakmi" is lexicographically less than the string b= "aezus". The first line contains one integer t ( 1 <= t <= 10^4 ). Then t test cases follow. Each test case is characterized by a string s , consisting of lowercase Latin letters ( 1 <= |s| <= 2 cdot 10^5 ). It is guaranteed that the sum of the lengths of the strings in all test cases does not exceed 2 cdot 10^5 . For each test case, output the lexicographically maximum string that can be obtained after applying a certain sequence of operations after which all characters in the string become unique. '... |
Editorial |
No solutions yet.