Good Bye 2025

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
2178 Good Bye 2025 FINISHED False 10800 9559523 Dec. 27, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 21455 ) B Impost or Sus PROGRAMMING greedy implementation strings

A string (w) consisting of lowercase Latin letters is called suspicious if and only if all of the following conditions hold: The letter (\mathtt{s}) appears at least twice, and For every occurrence of the letter (\mathtt{u}), the two nearest occurrences of (\mathtt{s}) are the same number of characters away from the (\mathtt{u}). After watching you finish a string task, your friend Aka has gifted you a string (r) consisting only of letters (\mathtt{s}) and (\mathtt{u}). You can perform the following operation on (r): Choose an index (i) ((1\le i\le |r|)), and set (r_i) to (\mathtt{s}). Determine the minimum number of operations needed to make (r) suspicious . It can be shown that, under the given constraints, it is always possible to transform (r) into a suspicious string. Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 10^4)). The description of the test cases follows. The only line of each test case contains the string (r) ((3\le |r|\le 2\cdot 10^5)). It is guaranteed that (r_i = \mathtt{s}) or (\mathtt{u}). It is guaranteed that the sum of (|r|) over all test cases does not exceed (2\cdot 10 ^ 5). For each test case, output a single integer — the minimum number of operations needed to make (r) suspicious . In the first test case, the string (\mathtt{sus}) is already suspicious because (\mathtt{s}) appears twice in the string and the two nearest (\mathtt{s}) to the only (\mathtt{u}) are both (1) character away: (\color{red}{\mathtt{s}}\underline{\mathtt{u}}\color{red}{\mathtt{s}}). In the second test case, it is optimal to perform the operation on indices (1), (3), and (4). After that, the string (s) becomes (suss). The string (\mathtt{suss}) is suspicious because (\mathtt{s}) appears (3) times in the string and the two nearest $$$\mathtt

Tutorials

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
355440535 ya_hossein B Dec. 28, 2025, 4:50 a.m. OK C# 13 TESTS 10 62 1228800
355439058 venugopal2003 B Dec. 28, 2025, 4:26 a.m. OK C++17 (GCC 7-32) TESTS 10 15 0
355446400 kidult.li1307 B Dec. 28, 2025, 6:07 a.m. OK C++17 (GCC 7-32) TESTS 10 31 0
355445541 Atharvak_2828 B Dec. 28, 2025, 5:57 a.m. OK C++17 (GCC 7-32) TESTS 10 31 0
355444693 Adm-17 B Dec. 28, 2025, 5:48 a.m. OK C++17 (GCC 7-32) TESTS 10 31 0
355444026 Ragnar21 B Dec. 28, 2025, 5:40 a.m. OK C++17 (GCC 7-32) TESTS 10 31 0
355442723 Alvy B Dec. 28, 2025, 5:23 a.m. OK C++17 (GCC 7-32) TESTS 10 31 0
355442014 __ishrak B Dec. 28, 2025, 5:13 a.m. OK C++17 (GCC 7-32) TESTS 10 31 0
355441733 satyam.gupta45 B Dec. 28, 2025, 5:09 a.m. OK C++17 (GCC 7-32) TESTS 10 31 0
355440448 fourier_123 B Dec. 28, 2025, 4:49 a.m. OK C++17 (GCC 7-32) TESTS 10 31 0
355439554 ejsingh.07 B Dec. 28, 2025, 4:34 a.m. OK C++17 (GCC 7-32) TESTS 10 31 0
355435077 mvp_luck B Dec. 28, 2025, 3:12 a.m. OK C++20 (GCC 13-64) TESTS 10 15 31539200
355446726 Madhur_20 B Dec. 28, 2025, 6:10 a.m. OK C++20 (GCC 13-64) TESTS 10 31 0
355443781 Phoenix_1729 B Dec. 28, 2025, 5:37 a.m. OK C++20 (GCC 13-64) TESTS 10 31 0
355443699 sadat_islam B Dec. 28, 2025, 5:36 a.m. OK C++20 (GCC 13-64) TESTS 10 31 0
355442840 buulee B Dec. 28, 2025, 5:25 a.m. OK C++20 (GCC 13-64) TESTS 10 31 0
355441051 ashishchokhani2910 B Dec. 28, 2025, 4:59 a.m. OK C++20 (GCC 13-64) TESTS 10 31 0
355440937 ashwin_22 B Dec. 28, 2025, 4:57 a.m. OK C++20 (GCC 13-64) TESTS 10 31 0
355440839 jay_jani_0011 B Dec. 28, 2025, 4:56 a.m. OK C++20 (GCC 13-64) TESTS 10 31 0
355440592 TORNADO_ B Dec. 28, 2025, 4:51 a.m. OK C++20 (GCC 13-64) TESTS 10 31 0
355440092 Parveen125690 B Dec. 28, 2025, 4:43 a.m. OK C++20 (GCC 13-64) TESTS 10 31 0

remove filters

Back to search problems