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 |
|---|---|---|---|---|---|---|
| 683 | Surprise Language Round 8 | FINISHED | False | 9000 | 310399185 | June 16, 2016, 4 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 168 ) | F | Reformat the String | PROGRAMMING | *special | 2000 |
In this problem you are given a string s consisting of uppercase and lowercase Latin letters, spaces, dots and commas. Your task is to correct the formatting of this string by removing and inserting spaces, as well as changing the case of the letters. After formatting, the resulting string must meet the following requirements: the string must not start with a space; there should be exactly one space between any two consecutive words; there should be a Latin letter immediately before a dot or a comma, and there should be a space immediately after a dot or a comma in the case that there is a word after that dot or comma, otherwise that dot or comma must be the last character in the string; all letters must be lowercase, except all first letters in the first words of the sentences, they must be capitalized. The first word of a sentence is a word that is either the first word of the string or a word after a dot. It is guaranteed that there is at least one letter in the given string between any two punctuation marks (commas and dots are punctuation marks). There is at least one letter before the leftmost punctuation mark. The first line contains a non-empty string s , consisting of uppercase and lowercase Latin letters, spaces, dots and commas. The length of the given string does not exceed 255. The string is guaranteed to have at least one character other than the space. Output the corrected string which meets all the requirements described in the statement. |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 18529102 | tjake | F | June 16, 2016, 6:26 p.m. | OK | Kotlin | TESTS | 30 | 124 | 0 | 2000 | |
| 18529054 | anzu | F | June 16, 2016, 6:24 p.m. | OK | Kotlin | TESTS | 30 | 124 | 0 | 2000 | |
| 18525945 | pitfall | F | June 16, 2016, 4:45 p.m. | OK | Kotlin | TESTS | 30 | 124 | 0 | 2000 | |
| 18527491 | tafit3 | F | June 16, 2016, 5:31 p.m. | OK | Kotlin | TESTS | 30 | 139 | 0 | 2000 | |
| 18525553 | IgorAkhmetov | F | June 16, 2016, 4:35 p.m. | OK | Kotlin | TESTS | 30 | 139 | 0 | 2000 | |
| 23365249 | Ali.Pi | F | Dec. 27, 2016, 6:41 p.m. | OK | Kotlin | TESTS | 30 | 139 | 20684800 | 2000 | |
| 68344787 | nealzane | F | Jan. 7, 2020, 6:33 a.m. | OK | Kotlin | TESTS | 30 | 140 | 0 | 2000 | |
| 40984284 | ReaLNero1 | F | July 30, 2018, 7:17 p.m. | OK | Kotlin | TESTS | 30 | 140 | 0 | 2000 | |
| 18542421 | ZiyaZa | F | June 17, 2016, 12:14 p.m. | OK | Kotlin | TESTS | 30 | 140 | 0 | 2000 | |
| 18529114 | LeiQ | F | June 16, 2016, 6:26 p.m. | OK | Kotlin | TESTS | 30 | 140 | 0 | 2000 |
Back to search problems