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 |
---|---|---|---|---|---|---|
1539 | Codeforces Round 727 (Div. 2) | FINISHED | False | 7200 | 113082863 | June 20, 2021, 10:05 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 24995 ) | B | Love Song | PROGRAMMING | dp implementation strings | 800 |
B'Petya once wrote a sad love song and shared it to Vasya. The song is a string consisting of lowercase English letters. Vasya made up q questions about this song. Each question is about a subsegment of the song starting from the l -th letter to the r -th letter. Vasya considers a substring made up from characters on this segment and repeats each letter in the subsegment k times, where k is the index of the corresponding letter in the alphabet. For example, if the question is about the substring "abbcb", then Vasya repeats letter 'a ' once, each of the letters 'b ' twice, letter 'c" three times, so that the resulting string is "abbbbcccbb", its length is 10 . Vasya is interested about the length of the resulting string. Help Petya find the length of each string obtained by Vasya. The first line contains two integers n and q ( 1 <= q n <= q 100 ,000 , 1 <= q q <= q 100 ,000 ) -- the length of the song and the number of questions. The second line contains one string s -- the song, consisting of n lowercase letters of English letters. Vasya 's questions are contained in the next q lines. Each line contains two integers l and r ( 1 <= q l <= q r <= q n ) -- the bounds of the question. Print q lines: for each question print the length of the string obtained by Vasya. In the first example Vasya is interested in three questions. In the first question Vasya considers the substring "aba", that transforms to "abba", so the answer is equal to 4 . In the second question Vasya considers "baca", that transforms to "bbaccca", so the answer is 7 . In the third question Vasya considers the string "abacaba",that transforms to "abbacccabba" of length 11 . '... |
tutorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
120173281 | Sriram_2002 | B | June 21, 2021, 4:37 a.m. | OK | GNU C11 | TESTS | 25 | 405 | 512000 | 800 | |
120167482 | sumanthbittu | B | June 21, 2021, 1:54 a.m. | OK | GNU C11 | TESTS | 25 | 405 | 512000 | 800 | |
120173213 | Sriram_2002 | B | June 21, 2021, 4:35 a.m. | OK | GNU C11 | TESTS | 25 | 405 | 512000 | 800 | |
120155300 | SMR_87 | B | June 20, 2021, 6:18 p.m. | OK | GNU C11 | TESTS | 25 | 405 | 921600 | 800 | |
120131462 | akash36437 | B | June 20, 2021, 1:43 p.m. | OK | GNU C11 | TESTS | 25 | 405 | 921600 | 800 | |
120130347 | wyxchn | B | June 20, 2021, 1:34 p.m. | OK | GNU C11 | TESTS | 25 | 405 | 921600 | 800 | |
120141796 | abhinava_kv | B | June 20, 2021, 3:17 p.m. | OK | GNU C11 | TESTS | 25 | 420 | 512000 | 800 | |
120134936 | Ulzl00 | B | June 20, 2021, 2:13 p.m. | OK | GNU C11 | TESTS | 25 | 421 | 819200 | 800 | |
120153553 | 20bcs030 | B | June 20, 2021, 5:50 p.m. | OK | GNU C11 | TESTS | 25 | 421 | 921600 | 800 | |
120153508 | aniruddha_deb | B | June 20, 2021, 5:49 p.m. | OK | GNU C11 | TESTS | 25 | 436 | 1740800 | 800 | |
120128131 | WHY2020 | B | June 20, 2021, 1:18 p.m. | OK | GNU C++11 | TESTS | 25 | 46 | 921600 | 800 | |
120138957 | youngsystem | B | June 20, 2021, 2:50 p.m. | OK | GNU C++11 | TESTS | 25 | 46 | 1843200 | 800 | |
120173189 | liang_cheng | B | June 21, 2021, 4:35 a.m. | OK | GNU C++11 | TESTS | 25 | 46 | 4710400 | 800 | |
120139840 | bkifhr9 | B | June 20, 2021, 2:58 p.m. | OK | GNU C++11 | TESTS | 25 | 61 | 10547200 | 800 | |
120163972 | pikapikachu | B | June 20, 2021, 10:35 p.m. | OK | GNU C++11 | TESTS | 25 | 62 | 512000 | 800 | |
120166723 | tan45 | B | June 21, 2021, 1:23 a.m. | OK | GNU C++11 | TESTS | 25 | 62 | 512000 | 800 | |
120166519 | Epiphanyi | B | June 21, 2021, 1:14 a.m. | OK | GNU C++11 | TESTS | 25 | 62 | 614400 | 800 | |
120151007 | xsc | B | June 20, 2021, 5:10 p.m. | OK | GNU C++11 | TESTS | 25 | 62 | 921600 | 800 | |
120141424 | yiq | B | June 20, 2021, 3:14 p.m. | OK | GNU C++11 | TESTS | 25 | 62 | 90214400 | 800 | |
120130255 | chen_03 | B | June 20, 2021, 1:33 p.m. | OK | GNU C++11 | TESTS | 25 | 77 | 307200 | 800 | |
120136859 | tushakar | B | June 20, 2021, 2:31 p.m. | OK | GNU C++14 | TESTS | 25 | 62 | 512000 | 800 | |
120127644 | caesarji | B | June 20, 2021, 1:14 p.m. | OK | GNU C++14 | TESTS | 24 | 77 | 512000 | 800 | |
120148973 | shahil198 | B | June 20, 2021, 4:38 p.m. | OK | GNU C++14 | TESTS | 25 | 77 | 716800 | 800 | |
120147531 | aman_5311 | B | June 20, 2021, 4:18 p.m. | OK | GNU C++14 | TESTS | 25 | 77 | 716800 | 800 | |
120143582 | Noob_coder736 | B | June 20, 2021, 3:35 p.m. | OK | GNU C++14 | TESTS | 25 | 77 | 1228800 | 800 | |
120140037 | Aakriti_tulika | B | June 20, 2021, 3 p.m. | OK | GNU C++14 | TESTS | 25 | 77 | 1228800 | 800 | |
120163277 | Dynamic_Squid | B | June 20, 2021, 9:53 p.m. | OK | GNU C++14 | TESTS | 25 | 78 | 716800 | 800 | |
120135470 | p.ferrari | B | June 20, 2021, 2:18 p.m. | OK | GNU C++14 | TESTS | 25 | 78 | 716800 | 800 | |
120129369 | pavankalyanpallapolu | B | June 20, 2021, 1:26 p.m. | OK | GNU C++14 | TESTS | 25 | 78 | 716800 | 800 | |
120136904 | tahsin_protik | B | June 20, 2021, 2:31 p.m. | OK | GNU C++14 | TESTS | 25 | 78 | 921600 | 800 | |
120169773 | Samaresh | B | June 21, 2021, 3:10 a.m. | OK | GNU C++17 | TESTS | 25 | 62 | 819200 | 800 | |
120165615 | dangtiendung1201 | B | June 21, 2021, 12:29 a.m. | OK | GNU C++17 | TESTS | 25 | 77 | 716800 | 800 | |
120164237 | lethan3 | B | June 20, 2021, 10:54 p.m. | OK | GNU C++17 | TESTS | 25 | 77 | 716800 | 800 | |
120160258 | FirasMesbeh | B | June 20, 2021, 8:09 p.m. | OK | GNU C++17 | TESTS | 25 | 77 | 716800 | 800 | |
120157992 | HEI5ENBERG69 | B | June 20, 2021, 7:11 p.m. | OK | GNU C++17 | TESTS | 25 | 77 | 716800 | 800 | |
120153403 | yog_111 | B | June 20, 2021, 5:48 p.m. | OK | GNU C++17 | TESTS | 25 | 77 | 716800 | 800 | |
120177944 | the.one.liner | B | June 21, 2021, 5:53 a.m. | OK | GNU C++17 | TESTS | 25 | 77 | 716800 | 800 | |
120175574 | bhagyeshganatra | B | June 21, 2021, 5:18 a.m. | OK | GNU C++17 | TESTS | 25 | 77 | 716800 | 800 | |
120176052 | Indraji7 | B | June 21, 2021, 5:25 a.m. | OK | GNU C++17 | TESTS | 25 | 77 | 716800 | 800 | |
120172257 | mubin_akib | B | June 21, 2021, 4:12 a.m. | OK | GNU C++17 | TESTS | 25 | 77 | 716800 | 800 | |
120141654 | Chingum | B | June 20, 2021, 3:16 p.m. | OK | GNU C++17 (64) | TESTS | 25 | 61 | 716800 | 800 | |
120150752 | Tanbin_Hasan | B | June 20, 2021, 5:06 p.m. | OK | GNU C++17 (64) | TESTS | 25 | 61 | 1126400 | 800 | |
120157239 | MarcosK | B | June 20, 2021, 6:56 p.m. | OK | GNU C++17 (64) | TESTS | 25 | 61 | 1126400 | 800 | |
120145900 | Utkarsh_cyborg | B | June 20, 2021, 3:58 p.m. | OK | GNU C++17 (64) | TESTS | 25 | 61 | 2355200 | 800 | |
120172274 | DeclareWar | B | June 21, 2021, 4:12 a.m. | OK | GNU C++17 (64) | TESTS | 25 | 61 | 2355200 | 800 | |
120153582 | Bu1bu1 | B | June 20, 2021, 5:50 p.m. | OK | GNU C++17 (64) | TESTS | 25 | 62 | 409600 | 800 | |
120130445 | wyyxhjth | B | June 20, 2021, 1:35 p.m. | OK | GNU C++17 (64) | TESTS | 25 | 62 | 512000 | 800 | |
120153745 | RP_21 | B | June 20, 2021, 5:53 p.m. | OK | GNU C++17 (64) | TESTS | 25 | 62 | 614400 | 800 | |
120172204 | b2jena | B | June 21, 2021, 4:11 a.m. | OK | GNU C++17 (64) | TESTS | 25 | 62 | 716800 | 800 | |
120178387 | yajusharma12 | B | June 21, 2021, 6 a.m. | OK | GNU C++17 (64) | TESTS | 25 | 62 | 716800 | 800 | |
120168295 | tranquyetthang281 | B | June 21, 2021, 2:24 a.m. | OK | Haskell | TESTS | 25 | 530 | 6348800 | 800 | |
120163565 | bluesky111 | B | June 20, 2021, 10:10 p.m. | OK | Java 11 | TESTS | 25 | 202 | 0 | 800 | |
120160523 | Andwerp | B | June 20, 2021, 8:16 p.m. | OK | Java 11 | TESTS | 25 | 233 | 0 | 800 | |
120163931 | Is2ac | B | June 20, 2021, 10:32 p.m. | OK | Java 11 | TESTS | 25 | 233 | 0 | 800 | |
120163894 | wizwilzo | B | June 20, 2021, 10:30 p.m. | OK | Java 11 | TESTS | 25 | 233 | 0 | 800 | |
120147234 | WalrusRamen21 | B | June 20, 2021, 4:14 p.m. | OK | Java 11 | TESTS | 25 | 264 | 0 | 800 | |
120149328 | Plums | B | June 20, 2021, 4:44 p.m. | OK | Java 11 | TESTS | 25 | 264 | 0 | 800 | |
120131956 | Charigardash | B | June 20, 2021, 1:47 p.m. | OK | Java 11 | TESTS | 25 | 264 | 0 | 800 | |
120157015 | zenilharia26 | B | June 20, 2021, 6:51 p.m. | OK | Java 11 | TESTS | 25 | 264 | 17612800 | 800 | |
120143488 | dinosparton_013 | B | June 20, 2021, 3:34 p.m. | OK | Java 11 | TESTS | 25 | 265 | 0 | 800 | |
120131111 | ITS_OKAY_TO_CHILL | B | June 20, 2021, 1:40 p.m. | OK | Java 11 | TESTS | 25 | 265 | 16896000 | 800 | |
120175580 | mananparmar | B | June 21, 2021, 5:18 a.m. | OK | Java 8 | TESTS | 25 | 140 | 0 | 800 | |
120136615 | Hasib_Ullah | B | June 20, 2021, 2:29 p.m. | OK | Java 8 | TESTS | 25 | 155 | 0 | 800 | |
120152760 | nattu179 | B | June 20, 2021, 5:38 p.m. | OK | Java 8 | TESTS | 25 | 155 | 0 | 800 | |
120148068 | Rahul_Adlakha | B | June 20, 2021, 4:25 p.m. | OK | Java 8 | TESTS | 25 | 155 | 0 | 800 | |
120171714 | InANutshell | B | June 21, 2021, 4 a.m. | OK | Java 8 | TESTS | 25 | 156 | 0 | 800 | |
120149205 | Prime_Geek | B | June 20, 2021, 4:42 p.m. | OK | Java 8 | TESTS | 25 | 171 | 0 | 800 | |
120171682 | InANutshell | B | June 21, 2021, 3:59 a.m. | OK | Java 8 | TESTS | 25 | 171 | 0 | 800 | |
120161531 | Piyushnagpal80 | B | June 20, 2021, 8:45 p.m. | OK | Java 8 | TESTS | 25 | 171 | 0 | 800 | |
120132744 | gssakash | B | June 20, 2021, 1:54 p.m. | OK | Java 8 | TESTS | 25 | 171 | 0 | 800 | |
120135075 | pranavggupta06 | B | June 20, 2021, 2:14 p.m. | OK | Java 8 | TESTS | 25 | 187 | 0 | 800 | |
120166908 | guga451 | B | June 21, 2021, 1:30 a.m. | OK | Kotlin | TESTS | 25 | 264 | 19046400 | 800 | |
120166650 | guga451 | B | June 21, 2021, 1:20 a.m. | OK | Kotlin | TESTS | 25 | 951 | 19251200 | 800 | |
120166488 | guga451 | B | June 21, 2021, 1:12 a.m. | OK | Kotlin | TESTS | 25 | 1013 | 20889600 | 800 | |
120166607 | guga451 | B | June 21, 2021, 1:18 a.m. | OK | Kotlin | TESTS | 25 | 1029 | 20889600 | 800 | |
120143768 | ryo_n | B | June 20, 2021, 3:36 p.m. | OK | Kotlin | TESTS | 25 | 1248 | 86016000 | 800 | |
120147002 | TRR | B | June 20, 2021, 4:11 p.m. | OK | Mono C# | TESTS | 25 | 701 | 3686400 | 800 | |
120149495 | pratik712 | B | June 20, 2021, 4:46 p.m. | OK | MS C++ | TESTS | 25 | 482 | 1126400 | 800 | |
120142662 | ZhaoFengBo | B | June 20, 2021, 3:25 p.m. | OK | MS C++ | TESTS | 25 | 483 | 409600 | 800 | |
120177092 | Alexey | B | June 21, 2021, 5:41 a.m. | OK | MS C++ 2017 | TESTS | 25 | 93 | 921600 | 800 | |
120150967 | xsc | B | June 20, 2021, 5:09 p.m. | OK | MS C++ 2017 | TESTS | 25 | 109 | 921600 | 800 | |
120157593 | gleb32 | B | June 20, 2021, 7:03 p.m. | OK | MS C++ 2017 | TESTS | 25 | 217 | 716800 | 800 | |
120175230 | Prabhat2110 | B | June 21, 2021, 5:12 a.m. | OK | MS C++ 2017 | TESTS | 25 | 529 | 716800 | 800 | |
120151306 | Tiran_- | B | June 20, 2021, 5:15 p.m. | OK | MS C++ 2017 | TESTS | 25 | 530 | 716800 | 800 | |
120137965 | changlin.fu | B | June 20, 2021, 2:41 p.m. | OK | MS C++ 2017 | TESTS | 25 | 530 | 716800 | 800 | |
120142317 | IYI4k | B | June 20, 2021, 3:22 p.m. | OK | MS C++ 2017 | TESTS | 25 | 530 | 1024000 | 800 | |
120155197 | Ilyaiq300 | B | June 20, 2021, 6:16 p.m. | OK | MS C++ 2017 | TESTS | 25 | 561 | 13414400 | 800 | |
120133370 | nik2005 | B | June 20, 2021, 1:59 p.m. | OK | MS C++ 2017 | TESTS | 25 | 592 | 1024000 | 800 | |
120129114 | sakapon | B | June 20, 2021, 1:25 p.m. | OK | .NET Core C# | TESTS | 25 | 140 | 5529600 | 800 | |
120153431 | rishabnahar2025 | B | June 20, 2021, 5:48 p.m. | OK | PyPy 2 | TESTS | 25 | 264 | 14950400 | 800 | |
120139780 | vinay272001 | B | June 20, 2021, 2:58 p.m. | OK | PyPy 2 | TESTS | 25 | 919 | 24473600 | 800 | |
120150626 | bravotango | B | June 20, 2021, 5:04 p.m. | OK | PyPy 3 | TESTS | 25 | 187 | 6451200 | 800 | |
120178355 | PiKa_PiKaa_chuuu | B | June 21, 2021, 5:59 a.m. | OK | PyPy 3 | TESTS | 25 | 187 | 7680000 | 800 | |
120160430 | dufresne_1949 | B | June 20, 2021, 8:13 p.m. | OK | PyPy 3 | TESTS | 25 | 202 | 7680000 | 800 | |
120140578 | songtae | B | June 20, 2021, 3:05 p.m. | OK | PyPy 3 | TESTS | 25 | 218 | 7782400 | 800 | |
120136282 | Half_coder | B | June 20, 2021, 2:25 p.m. | OK | PyPy 3 | TESTS | 25 | 280 | 9318400 | 800 | |
120135545 | Half_coder | B | June 20, 2021, 2:19 p.m. | OK | PyPy 3 | TESTS | 25 | 280 | 9318400 | 800 | |
120134591 | rivnam | B | June 20, 2021, 2:10 p.m. | OK | PyPy 3 | TESTS | 25 | 296 | 21708800 | 800 | |
120145190 | Aestroix | B | June 20, 2021, 3:50 p.m. | OK | PyPy 3 | TESTS | 25 | 296 | 212377600 | 800 | |
120130490 | coder_sounak | B | June 20, 2021, 1:35 p.m. | OK | PyPy 3 | TESTS | 25 | 327 | 16179200 | 800 | |
120126140 | not_tehlka | B | June 20, 2021, 1:06 p.m. | OK | PyPy 3 | TESTS | 24 | 342 | 35020800 | 800 | |
120127061 | subhajitdas | B | June 20, 2021, 1:10 p.m. | OK | Python 3 | TESTS | 24 | 389 | 6041600 | 800 | |
120151170 | eugalt | B | June 20, 2021, 5:12 p.m. | OK | Python 3 | TESTS | 25 | 390 | 7372800 | 800 | |
120160899 | asd-code123 | B | June 20, 2021, 8:26 p.m. | OK | Python 3 | TESTS | 25 | 404 | 2764800 | 800 | |
120131631 | The_KingSlayer_ | B | June 20, 2021, 1:45 p.m. | OK | Python 3 | TESTS | 25 | 405 | 7372800 | 800 | |
120130787 | The_KingSlayer_ | B | June 20, 2021, 1:38 p.m. | OK | Python 3 | TESTS | 25 | 405 | 7475200 | 800 | |
120135129 | hellohowareyou | B | June 20, 2021, 2:15 p.m. | OK | Python 3 | TESTS | 25 | 436 | 2867200 | 800 | |
120174947 | ..i.. | B | June 21, 2021, 5:07 a.m. | OK | Python 3 | TESTS | 25 | 436 | 6963200 | 800 | |
120155607 | abhisheka950 | B | June 20, 2021, 6:24 p.m. | OK | Python 3 | TESTS | 25 | 452 | 7065600 | 800 | |
120125798 | Dinoh_Sandys | B | June 20, 2021, 1:05 p.m. | OK | Python 3 | TESTS | 24 | 467 | 3584000 | 800 | |
120144994 | siramk | B | June 20, 2021, 3:48 p.m. | OK | Python 3 | TESTS | 25 | 561 | 6860800 | 800 | |
120142076 | p00f | B | June 20, 2021, 3:20 p.m. | OK | Rust | TESTS | 25 | 31 | 921600 | 800 | |
120130853 | Grevozin | B | June 20, 2021, 1:38 p.m. | OK | Rust | TESTS | 25 | 249 | 2252800 | 800 | |
120139786 | anula | B | June 20, 2021, 2:58 p.m. | OK | Rust | TESTS | 25 | 966 | 15769600 | 800 |
Back to search problems