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 |
---|---|---|---|---|---|---|
1533 | Kotlin Heroes: Episode 7 | FINISHED | False | 9000 | 106845899 | June 29, 2021, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 215 ) | F | Binary String Partition | PROGRAMMING | *special binary search greedy |
B"Let's call a string t consisting of characters 0 and/or 1 beautiful, if either the number of occurrences of character 0 in this string does not exceed k , or the number of occurrences of characters 1 in this string does not exceed k (or both). For example, if k = 3 , the strings 101010, 111, 0, 00000, 1111111000 are beautiful, and the strings 1111110000, 01010101 are not beautiful. You are given a string s . You have to divide it into the minimum possible number of beautiful strings, i. xe2 x80 x89e., find a sequence of strings t_1, t_2, ... , t_m such that every t_i is beautiful, t_1 + t_2 + ... + t_m = s (where + is the concatenation operator), and m is minimum possible. For every k from 1 to |s| , find the minimum possible number of strings such that s can be divided into them (i. xe2 x80 x89e. the minimum possible m in the partition). The only line contains one string s ( 1 <= |s| <= 2 cdot 10^5 ). Each character of s is either 0 or 1. Print |s| integers. The i -th integer should be equal to the minimum number of strings in the partition of s , when k = i . "... |
Kotlin Heroes 7 — Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
120913528 | Spheniscine | F | June 29, 2021, 11:48 p.m. | OK | Kotlin | TESTS | 28 | 187 | 1945600 | ||
120907479 | davidberard | F | June 29, 2021, 7:48 p.m. | OK | Kotlin | TESTS | 28 | 187 | 6246400 | ||
120920497 | b2jena | F | June 30, 2021, 4:11 a.m. | OK | Kotlin | TESTS | 28 | 202 | 0 | ||
120889461 | timmyfeng | F | June 29, 2021, 3:26 p.m. | OK | Kotlin | TESTS | 28 | 202 | 0 | ||
120888109 | Tlatoani | F | June 29, 2021, 3:13 p.m. | OK | Kotlin | TESTS | 28 | 202 | 0 | ||
120887996 | eatmore | F | June 29, 2021, 3:12 p.m. | OK | Kotlin | TESTS | 28 | 202 | 0 | ||
120886371 | Petr | F | June 29, 2021, 2:58 p.m. | OK | Kotlin | TESTS | 28 | 202 | 0 | ||
120907313 | davidberard | F | June 29, 2021, 7:43 p.m. | OK | Kotlin | TESTS | 28 | 202 | 6144000 | ||
120907350 | davidberard | F | June 29, 2021, 7:44 p.m. | OK | Kotlin | TESTS | 28 | 202 | 6246400 | ||
120888623 | Fortin | F | June 29, 2021, 3:18 p.m. | OK | Kotlin | TESTS | 28 | 218 | 0 |
Back to search problems