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 |
---|---|---|---|---|---|---|
1833 | Codeforces Round 874 (Div. 3) | FINISHED | False | 8100 | 52759463 | May 19, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 33117 ) | A | Musical Puzzle | PROGRAMMING | implementation |
B'Vlad decided to compose a melody on his guitar. Let 's represent the melody as a sequence of notes corresponding to the characters 'a ', 'b ', 'c ', 'd ', 'e ', 'f ', and 'g '. However, Vlad is not very experienced in playing the guitar and can only record exactly two notes at a time. Vlad wants to obtain the melody s , and to do this, he can merge the recorded melodies together. In this case, the last sound of the first melody must match the first sound of the second melody. For example, if Vlad recorded the melodies "ab" and "ba", he can merge them together and obtain the melody "aba", and then merge the result with "ab" to get "abab". Help Vlad determine the minimum number of melodies consisting of two notes that he needs to record in order to obtain the melody s . The first line of input contains an integer t ( 1 <= t <= 10^4 ) -- the number of test cases. Following that are the descriptions of the test cases. The first line of each test case contains an integer n ( 2 <= n <= 50 ) -- the length of the melody s . The second line of each test case contains a string s of length n , consisting of characters 'a ', 'b ', 'c ', 'd ', 'e ', 'f ', 'g '. Output t integers, each representing the answer for the corresponding test case. As the answer output minimum number of melodies consisting of two notes that Vlad needs to record. In the first sample, you need to record the melodies "ab" and "ba", as described in the problem statement. In the second sample, you need to record the melodies "ab", "ba", "ac", and "ca". In the third sample, the only necessary melody is "aa". '... |
116636 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
206575325 | mban259 | A | May 19, 2023, 11:36 p.m. | OK | C# 10 | TESTS | 4 | 61 | 3072000 | ||
206534461 | 2000031331 | A | May 19, 2023, 4:29 p.m. | OK | C# 10 | TESTS | 3 | 108 | 3072000 | ||
206574117 | bluemegane | A | May 19, 2023, 10:54 p.m. | OK | C# 8 | TESTS | 4 | 139 | 3379200 | ||
206537322 | sebagonz106 | A | May 19, 2023, 4:36 p.m. | OK | C# 8 | TESTS | 3 | 234 | 3276800 | ||
206564088 | sysadmin | A | May 19, 2023, 7:26 p.m. | OK | Clang++17 Diagnostics | TESTS | 4 | 296 | 1024000 | ||
206570012 | baldron | A | May 19, 2023, 9:01 p.m. | OK | GNU C11 | TESTS | 4 | 46 | 0 | ||
206541500 | adityaduggaraju | A | May 19, 2023, 4:45 p.m. | OK | GNU C11 | TESTS | 3 | 46 | 0 | ||
206562115 | Aneeba | A | May 19, 2023, 7:01 p.m. | OK | GNU C11 | TESTS | 4 | 46 | 0 | ||
206554982 | ujjwi018 | A | May 19, 2023, 5:43 p.m. | OK | GNU C11 | TESTS | 4 | 62 | 0 | ||
206576056 | dulalhossain71579 | A | May 20, 2023, 12:04 a.m. | OK | GNU C11 | TESTS | 4 | 62 | 0 | ||
206534679 | kemirs | A | May 19, 2023, 4:30 p.m. | OK | GNU C11 | TESTS | 3 | 62 | 0 | ||
206534903 | GooRuem721 | A | May 19, 2023, 4:30 p.m. | OK | GNU C11 | TESTS | 3 | 62 | 0 | ||
206567048 | iffatul_anon | A | May 19, 2023, 8:09 p.m. | OK | GNU C11 | TESTS | 4 | 77 | 0 | ||
206553306 | ZM_QMZS | A | May 19, 2023, 5:27 p.m. | OK | GNU C11 | TESTS | 4 | 78 | 0 | ||
206562193 | mohid_mahin | A | May 19, 2023, 7:02 p.m. | OK | GNU C11 | TESTS | 4 | 78 | 0 | ||
206576872 | Mr_KaYa | A | May 20, 2023, 12:36 a.m. | OK | GNU C++14 | TESTS | 4 | 0 | 0 | ||
206574891 | 8Mebius8 | A | May 19, 2023, 11:19 p.m. | OK | GNU C++14 | TESTS | 4 | 30 | 0 | ||
206542216 | G.S.C | A | May 19, 2023, 4:47 p.m. | OK | GNU C++14 | TESTS | 3 | 30 | 4505600 | ||
206576003 | Ice_teapoy | A | May 20, 2023, 12:02 a.m. | OK | GNU C++14 | TESTS | 4 | 31 | 0 | ||
206537281 | linshanTvT | A | May 19, 2023, 4:36 p.m. | OK | GNU C++14 | TESTS | 3 | 31 | 102400 | ||
206535362 | malpurekaushal | A | May 19, 2023, 4:31 p.m. | OK | GNU C++14 | TESTS | 3 | 31 | 204800 | ||
206577415 | mineko | A | May 20, 2023, 12:53 a.m. | OK | GNU C++14 | TESTS | 4 | 46 | 102400 | ||
206537315 | sybsyb | A | May 19, 2023, 4:36 p.m. | OK | GNU C++14 | TESTS | 3 | 46 | 102400 | ||
206547242 | shoib15-5511 | A | May 19, 2023, 5:07 p.m. | OK | GNU C++14 | TESTS | 3 | 46 | 102400 | ||
206548023 | Shaurya_CodeForces | A | May 19, 2023, 5:12 p.m. | OK | GNU C++14 | TESTS | 3 | 46 | 204800 | ||
206563320 | isnotavail | A | May 19, 2023, 7:16 p.m. | OK | GNU C++17 | TESTS | 4 | 15 | 0 | ||
206540322 | wikolego | A | May 19, 2023, 4:43 p.m. | OK | GNU C++17 | TESTS | 3 | 15 | 0 | ||
206555282 | Asunataisiki | A | May 19, 2023, 5:46 p.m. | OK | GNU C++17 | TESTS | 4 | 15 | 0 | ||
206557250 | edwardnvv57k | A | May 19, 2023, 6:05 p.m. | OK | GNU C++17 | TESTS | 4 | 15 | 0 | ||
206576742 | linjiangli | A | May 20, 2023, 12:31 a.m. | OK | GNU C++17 | TESTS | 4 | 30 | 0 | ||
206544364 | hare_krishna | A | May 19, 2023, 4:52 p.m. | OK | GNU C++17 | TESTS | 3 | 30 | 102400 | ||
206567457 | charsi2000 | A | May 19, 2023, 8:16 p.m. | OK | GNU C++17 | TESTS | 4 | 30 | 4198400 | ||
206560393 | Aref_Adibian20 | A | May 19, 2023, 6:39 p.m. | OK | GNU C++17 | TESTS | 4 | 31 | 0 | ||
206540858 | Trinabh | A | May 19, 2023, 4:44 p.m. | OK | GNU C++17 | TESTS | 3 | 31 | 0 | ||
206547434 | I_want_be_master | A | May 19, 2023, 5:08 p.m. | OK | GNU C++17 | TESTS | 3 | 31 | 102400 | ||
206574245 | Rania | A | May 19, 2023, 10:57 p.m. | OK | GNU C++17 (64) | TESTS | 4 | 31 | 3174400 | ||
206553709 | The_Destroyer15 | A | May 19, 2023, 5:31 p.m. | OK | GNU C++17 (64) | TESTS | 4 | 46 | 0 | ||
206569918 | Mohit. | A | May 19, 2023, 8:59 p.m. | OK | GNU C++17 (64) | TESTS | 4 | 46 | 0 | ||
206561388 | Proofy | A | May 19, 2023, 6:51 p.m. | OK | GNU C++17 (64) | TESTS | 4 | 46 | 0 | ||
206553688 | Pratap | A | May 19, 2023, 5:31 p.m. | OK | GNU C++17 (64) | TESTS | 4 | 46 | 0 | ||
206535367 | 0_Shipul_1 | A | May 19, 2023, 4:31 p.m. | OK | GNU C++17 (64) | TESTS | 3 | 46 | 9625600 | ||
206553205 | Ankur_8789 | A | May 19, 2023, 5:26 p.m. | OK | GNU C++17 (64) | TESTS | 4 | 46 | 12390400 | ||
206534375 | Do3soka_ | A | May 19, 2023, 4:29 p.m. | OK | GNU C++17 (64) | TESTS | 3 | 61 | 0 | ||
206572915 | Soul_8789 | A | May 19, 2023, 10:15 p.m. | OK | GNU C++17 (64) | TESTS | 4 | 61 | 0 | ||
206574627 | animay620 | A | May 19, 2023, 11:11 p.m. | OK | GNU C++17 (64) | TESTS | 4 | 62 | 0 | ||
206534364 | sy0119 | A | May 19, 2023, 4:29 p.m. | OK | GNU C++20 (64) | TESTS | 3 | 0 | 0 | ||
206554657 | sam86_b | A | May 19, 2023, 5:40 p.m. | OK | GNU C++20 (64) | TESTS | 4 | 0 | 0 | ||
206577451 | DuonGKoNo | A | May 20, 2023, 12:54 a.m. | OK | GNU C++20 (64) | TESTS | 4 | 0 | 1024000 | ||
206565674 | RHEXAOC | A | May 19, 2023, 7:48 p.m. | OK | GNU C++20 (64) | TESTS | 4 | 15 | 0 | ||
206575524 | Yychen | A | May 19, 2023, 11:44 p.m. | OK | GNU C++20 (64) | TESTS | 4 | 15 | 0 | ||
206563007 | willy108 | A | May 19, 2023, 7:12 p.m. | OK | GNU C++20 (64) | TESTS | 4 | 15 | 0 | ||
206561920 | Pevo | A | May 19, 2023, 6:58 p.m. | OK | GNU C++20 (64) | TESTS | 4 | 15 | 0 | ||
206560779 | raghadnour05 | A | May 19, 2023, 6:44 p.m. | OK | GNU C++20 (64) | TESTS | 4 | 15 | 0 | ||
206552822 | kariouki | A | May 19, 2023, 5:23 p.m. | OK | GNU C++20 (64) | TESTS | 3 | 15 | 0 | ||
206564447 | Amdadul | A | May 19, 2023, 7:30 p.m. | OK | GNU C++20 (64) | TESTS | 4 | 15 | 102400 | ||
206561706 | Ayyylmao | A | May 19, 2023, 6:55 p.m. | OK | Java 11 | TESTS | 4 | 202 | 0 | ||
206555084 | himanshu19468 | A | May 19, 2023, 5:44 p.m. | OK | Java 11 | TESTS | 4 | 202 | 0 | ||
206555761 | vijender_8601 | A | May 19, 2023, 5:51 p.m. | OK | Java 11 | TESTS | 4 | 217 | 0 | ||
206561187 | koki_undef | A | May 19, 2023, 6:49 p.m. | OK | Java 11 | TESTS | 4 | 233 | 0 | ||
206546084 | saksham19270 | A | May 19, 2023, 5 p.m. | OK | Java 11 | TESTS | 3 | 233 | 0 | ||
206545930 | pxhero | A | May 19, 2023, 4:59 p.m. | OK | Java 11 | TESTS | 3 | 248 | 0 | ||
206557246 | hksenpai | A | May 19, 2023, 6:05 p.m. | OK | Java 11 | TESTS | 4 | 249 | 0 | ||
206534398 | kperepi | A | May 19, 2023, 4:29 p.m. | OK | Java 11 | TESTS | 3 | 327 | 0 | ||
206540728 | 2000030748 | A | May 19, 2023, 4:44 p.m. | OK | Java 11 | TESTS | 3 | 343 | 0 | ||
206553960 | _ANSHU01 | A | May 19, 2023, 5:33 p.m. | OK | Java 11 | TESTS | 4 | 358 | 0 | ||
206577458 | humwawe | A | May 20, 2023, 12:54 a.m. | OK | Java 17 | TESTS | 4 | 155 | 0 | ||
206573047 | kamranm | A | May 19, 2023, 10:19 p.m. | OK | Java 17 | TESTS | 4 | 233 | 110387200 | ||
206536961 | klu_2100030296 | A | May 19, 2023, 4:35 p.m. | OK | Java 17 | TESTS | 3 | 280 | 0 | ||
206572788 | Mostafa_Murad | A | May 19, 2023, 10:11 p.m. | OK | Java 17 | TESTS | 4 | 280 | 921600 | ||
206541276 | charles2307 | A | May 19, 2023, 4:45 p.m. | OK | Java 17 | TESTS | 3 | 296 | 0 | ||
206566119 | Eslam_Ahmed | A | May 19, 2023, 7:55 p.m. | OK | Java 17 | TESTS | 4 | 296 | 102400 | ||
206535061 | 20311a04g1 | A | May 19, 2023, 4:31 p.m. | OK | Java 17 | TESTS | 3 | 296 | 409600 | ||
206543616 | 2000030950_Sreeram | A | May 19, 2023, 4:49 p.m. | OK | Java 17 | TESTS | 3 | 311 | 614400 | ||
206536180 | 2100030298 | A | May 19, 2023, 4:33 p.m. | OK | Java 17 | TESTS | 3 | 312 | 204800 | ||
206537345 | Anurudh | A | May 19, 2023, 4:36 p.m. | OK | Java 17 | TESTS | 3 | 358 | 0 | ||
206570248 | lpychemistry | A | May 19, 2023, 9:06 p.m. | OK | Java 8 | TESTS | 4 | 155 | 0 | ||
206546196 | hasan8130 | A | May 19, 2023, 5 p.m. | OK | Java 8 | TESTS | 3 | 186 | 0 | ||
206553148 | Zoatel | A | May 19, 2023, 5:25 p.m. | OK | Java 8 | TESTS | 4 | 202 | 0 | ||
206541205 | s_zx | A | May 19, 2023, 4:45 p.m. | OK | Java 8 | TESTS | 3 | 233 | 0 | ||
206557974 | formidablechief_27 | A | May 19, 2023, 6:13 p.m. | OK | Java 8 | TESTS | 4 | 233 | 38707200 | ||
206542255 | Hruthik2004 | A | May 19, 2023, 4:47 p.m. | OK | Java 8 | TESTS | 3 | 249 | 0 | ||
206550039 | navya_sree19 | A | May 19, 2023, 5:14 p.m. | OK | Java 8 | TESTS | 3 | 264 | 0 | ||
206575452 | N.Tesla | A | May 19, 2023, 11:41 p.m. | OK | Java 8 | TESTS | 4 | 265 | 0 | ||
206556770 | R_G_9211 | A | May 19, 2023, 6:01 p.m. | OK | Java 8 | TESTS | 4 | 280 | 0 | ||
206541914 | sulthanso73 | A | May 19, 2023, 4:46 p.m. | OK | Java 8 | TESTS | 3 | 280 | 0 | ||
206534200 | wangpaopao1 | A | May 19, 2023, 4:29 p.m. | OK | MS C++ 2017 | TESTS | 3 | 77 | 0 | ||
206540501 | ChopaChin | A | May 19, 2023, 4:43 p.m. | OK | MS C++ 2017 | TESTS | 3 | 78 | 0 | ||
206534678 | saki_vhay | A | May 19, 2023, 4:30 p.m. | OK | MS C++ 2017 | TESTS | 3 | 92 | 0 | ||
206546369 | mukhaledd | A | May 19, 2023, 5:01 p.m. | OK | MS C++ 2017 | TESTS | 3 | 109 | 0 | ||
206574458 | swseverance | A | May 19, 2023, 11:05 p.m. | OK | Node.js | TESTS | 4 | 187 | 5939200 | ||
206555317 | khanter_ | A | May 19, 2023, 5:47 p.m. | OK | PyPy 3 | TESTS | 4 | 186 | 4812800 | ||
206556437 | brokie | A | May 19, 2023, 5:58 p.m. | OK | PyPy 3 | TESTS | 4 | 233 | 7065600 | ||
206545071 | Ayushman_123 | A | May 19, 2023, 4:54 p.m. | OK | PyPy 3 | TESTS | 3 | 264 | 7987200 | ||
206566590 | dominator1234 | A | May 19, 2023, 8:02 p.m. | OK | PyPy 3 | TESTS | 4 | 311 | 7168000 | ||
206575361 | alpy123 | A | May 19, 2023, 11:38 p.m. | OK | PyPy 3 | TESTS | 4 | 342 | 6656000 | ||
206545648 | arihant_j | A | May 19, 2023, 4:57 p.m. | OK | PyPy 3 | TESTS | 3 | 358 | 6451200 | ||
206544506 | DevidB | A | May 19, 2023, 4:52 p.m. | OK | PyPy 3 | TESTS | 3 | 389 | 6041600 | ||
206556180 | jvatsal0709 | A | May 19, 2023, 5:55 p.m. | OK | PyPy 3 | TESTS | 4 | 389 | 7168000 | ||
206555785 | ashmit-453 | A | May 19, 2023, 5:51 p.m. | OK | PyPy 3 | TESTS | 4 | 390 | 8294400 | ||
206572693 | Alex_Savitskiy | A | May 19, 2023, 10:08 p.m. | OK | PyPy 3 | TESTS | 4 | 405 | 8192000 | ||
206576199 | crapcode | A | May 20, 2023, 12:10 a.m. | OK | PyPy 3-64 | TESTS | 4 | 93 | 6041600 | ||
206552896 | cholebhature | A | May 19, 2023, 5:23 p.m. | OK | PyPy 3-64 | TESTS | 3 | 93 | 6656000 | ||
206553677 | KanishkGoel | A | May 19, 2023, 5:31 p.m. | OK | PyPy 3-64 | TESTS | 4 | 108 | 6348800 | ||
206559070 | reijnnn | A | May 19, 2023, 6:24 p.m. | OK | PyPy 3-64 | TESTS | 4 | 108 | 7372800 | ||
206544357 | LukaMagic | A | May 19, 2023, 4:52 p.m. | OK | PyPy 3-64 | TESTS | 3 | 124 | 5017600 | ||
206564363 | ankitesh | A | May 19, 2023, 7:29 p.m. | OK | PyPy 3-64 | TESTS | 4 | 124 | 6246400 | ||
206556478 | AadiS | A | May 19, 2023, 5:58 p.m. | OK | PyPy 3-64 | TESTS | 4 | 124 | 6348800 | ||
206562448 | the_last_smilodon | A | May 19, 2023, 7:05 p.m. | OK | PyPy 3-64 | TESTS | 4 | 124 | 7168000 | ||
206572024 | jerome_coding | A | May 19, 2023, 9:51 p.m. | OK | PyPy 3-64 | TESTS | 4 | 124 | 7577600 | ||
206557593 | drgrd | A | May 19, 2023, 6:09 p.m. | OK | PyPy 3-64 | TESTS | 4 | 124 | 8704000 | ||
206557772 | jktujg | A | May 19, 2023, 6:10 p.m. | OK | Python 3 | TESTS | 4 | 78 | 614400 | ||
206552337 | bharatkharbanda4 | A | May 19, 2023, 5:19 p.m. | OK | Python 3 | TESTS | 3 | 140 | 2252800 | ||
206557922 | jktujg | A | May 19, 2023, 6:12 p.m. | OK | Python 3 | TESTS | 4 | 155 | 0 | ||
206540048 | shalini_erram4 | A | May 19, 2023, 4:42 p.m. | OK | Python 3 | TESTS | 3 | 155 | 0 | ||
206539665 | M_Homka_M | A | May 19, 2023, 4:41 p.m. | OK | Python 3 | TESTS | 3 | 155 | 102400 | ||
206536620 | Imari | A | May 19, 2023, 4:34 p.m. | OK | Python 3 | TESTS | 3 | 170 | 0 | ||
206544964 | orazbek | A | May 19, 2023, 4:54 p.m. | OK | Python 3 | TESTS | 3 | 171 | 819200 | ||
206550286 | swapnil.2003 | A | May 19, 2023, 5:16 p.m. | OK | Python 3 | TESTS | 3 | 186 | 0 | ||
206537342 | Manasa_29 | A | May 19, 2023, 4:36 p.m. | OK | Python 3 | TESTS | 3 | 186 | 0 | ||
206539539 | 2000031621 | A | May 19, 2023, 4:41 p.m. | OK | Python 3 | TESTS | 3 | 187 | 0 | ||
206535075 | 2100032549rushmitha | A | May 19, 2023, 4:31 p.m. | OK | Ruby 3 | TESTS | 3 | 607 | 307200 | ||
206574337 | magnus.hegdahl | A | May 19, 2023, 11:01 p.m. | OK | Rust 2021 | TESTS | 4 | 0 | 307200 |
Back to search problems