Educational Codeforces Round 156 (Rated for Div. 2)

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
1886 Educational Codeforces Round 156 (Rated for Div. 2) FINISHED False 7200 79543523 Oct. 9, 2023, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 16463 ) C Decreasing String PROGRAMMING constructive algorithms strings

Recall that string a is lexicographically smaller than string b if a is a prefix of b (and a ne b ), or there exists an index i ( 1 <= i <= min(|a|, |b|) ) such that a_i < b_i , and for any index j ( 1 <= j < i ) a_j = b_j . Consider a sequence of strings s_1, s_2, ... , s_n , each consisting of lowercase Latin letters. String s_1 is given explicitly, and all other strings are generated according to the following rule: to obtain the string s_i , a character is removed from string s_{i-1} in such a way that string s_i is lexicographically minimal. For example, if s_1 = mathrm{dacb} , then string s_2 = mathrm{acb} , string s_3 = mathrm{ab} , string s_4 = mathrm{a} . After that, we obtain the string S = s_1 + s_2 + ... + s_n ( S is the concatenation of all strings s_1, s_2, ... , s_n ). You need to output the character in position pos of the string S (i. e. the character S_{pos} ). The first line contains one integer t -- the number of test cases ( 1 <= t <= 10^4 ). Each test case consists of two lines. The first line contains the string s_1 ( 1 <= |s_1| <= 10^6 ), consisting of lowercase Latin letters. The second line contains the integer pos ( 1 <= pos <= frac{|s_1| cdot (|s_1| +1)}{2} ). You may assume that n is equal to the length of the given string ( n = |s_1| ). Additional constraint on the input: the sum of |s_1| over all test cases does not exceed 10^6 . For each test case, print the answer -- the character that is at position pos in string S . Note that the answers between different test cases are not separated by spaces or line breaks.

Tutorials

Educational Codeforces Round 156 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
227446114 tgehr C Oct. 9, 2023, 6:54 p.m. OK D TESTS 12 218 24166400
227432776 leidianfei C Oct. 9, 2023, 5:14 p.m. OK GNU C++14 TESTS 12 30 2150400
227485170 jatinxkirito C Oct. 10, 2023, 5:44 a.m. OK GNU C++14 TESTS 12 30 4198400
227475322 xinjigu C Oct. 10, 2023, 3:32 a.m. OK GNU C++14 TESTS 12 30 6553600
227433789 subhrajitmukherjee3 C Oct. 9, 2023, 5:20 p.m. OK GNU C++14 TESTS 12 31 2048000
227420984 dinghaochen C Oct. 9, 2023, 4:31 p.m. OK GNU C++14 TESTS 12 31 2048000
227439803 yashkr2005 C Oct. 9, 2023, 6:02 p.m. OK GNU C++14 TESTS 12 31 2150400
227438736 rawalevedant C Oct. 9, 2023, 5:54 p.m. OK GNU C++14 TESTS 12 31 2150400
227484913 slappy C Oct. 10, 2023, 5:40 a.m. OK GNU C++14 TESTS 12 31 2252800
227442601 vish_vesh C Oct. 9, 2023, 6:23 p.m. OK GNU C++14 TESTS 12 31 2252800
227437467 hare__krsna C Oct. 9, 2023, 5:46 p.m. OK GNU C++14 TESTS 12 31 2252800
227469644 unknowndriver C Oct. 10, 2023, 2:01 a.m. OK GNU C++17 TESTS 12 15 3072000
227433542 qwqyyy C Oct. 9, 2023, 5:19 p.m. OK GNU C++17 TESTS 12 15 3072000
227445979 Platanito_Frito C Oct. 9, 2023, 6:53 p.m. OK GNU C++17 TESTS 12 15 5529600
227469673 Cheerio2021 C Oct. 10, 2023, 2:01 a.m. OK GNU C++17 TESTS 12 30 2560000
227457463 lallanbhai C Oct. 9, 2023, 9:03 p.m. OK GNU C++17 TESTS 12 30 3072000
227432350 Bestron C Oct. 9, 2023, 5:12 p.m. OK GNU C++17 TESTS 12 30 3072000
227467709 conexposys C Oct. 10, 2023, 1:22 a.m. OK GNU C++17 TESTS 12 30 3174400
227453595 rAnD0MA C Oct. 9, 2023, 8:12 p.m. OK GNU C++17 TESTS 12 30 3174400
227428244 Anchord C Oct. 9, 2023, 4:51 p.m. OK GNU C++17 TESTS 12 30 3174400
227468694 Muhammad_Aneeq C Oct. 10, 2023, 1:43 a.m. OK GNU C++17 TESTS 12 30 4096000
227484808 v2x1 C Oct. 10, 2023, 5:39 a.m. OK GNU C++17 (64) TESTS 12 15 3072000
227450542 Sahu_1402 C Oct. 9, 2023, 7:38 p.m. OK GNU C++17 (64) TESTS 12 15 3072000
227464565 ethening C Oct. 10, 2023, 12:03 a.m. OK GNU C++17 (64) TESTS 12 15 3174400
227424805 MUNISJONI_KHURSHEDJON C Oct. 9, 2023, 4:39 p.m. OK GNU C++17 (64) TESTS 12 30 2252800
227432771 fullmetal C Oct. 9, 2023, 5:14 p.m. OK GNU C++17 (64) TESTS 12 30 16384000
227450561 mimat_coder C Oct. 9, 2023, 7:38 p.m. OK GNU C++17 (64) TESTS 12 31 2048000
227480565 BharatTaneja01 C Oct. 10, 2023, 4:48 a.m. OK GNU C++17 (64) TESTS 12 31 3072000
227475219 BODH C Oct. 10, 2023, 3:31 a.m. OK GNU C++17 (64) TESTS 12 31 3072000
227474042 BODH C Oct. 10, 2023, 3:15 a.m. OK GNU C++17 (64) TESTS 12 31 3072000
227472938 Kingjoke C Oct. 10, 2023, 2:58 a.m. OK GNU C++17 (64) TESTS 12 31 3072000
227466158 nanoblob C Oct. 10, 2023, 12:46 a.m. OK GNU C++20 (64) TESTS 12 15 2150400
227439000 ladamalina C Oct. 9, 2023, 5:56 p.m. OK GNU C++20 (64) TESTS 12 15 2150400
227434307 maximlisa C Oct. 9, 2023, 5:23 p.m. OK GNU C++20 (64) TESTS 12 15 2150400
227428687 Cuteeeee C Oct. 9, 2023, 4:53 p.m. OK GNU C++20 (64) TESTS 12 15 2150400
227427527 RagnarOkk11 C Oct. 9, 2023, 4:49 p.m. OK GNU C++20 (64) TESTS 12 15 2150400
227426283 Bleeding_Purple C Oct. 9, 2023, 4:44 p.m. OK GNU C++20 (64) TESTS 12 15 2150400
227425213 rathiaditya131 C Oct. 9, 2023, 4:40 p.m. OK GNU C++20 (64) TESTS 12 15 2150400
227423175 gopikrishna000 C Oct. 9, 2023, 4:34 p.m. OK GNU C++20 (64) TESTS 12 15 2150400
227439553 PresentLogic C Oct. 9, 2023, 6 p.m. OK GNU C++20 (64) TESTS 12 15 2252800
227486259 HemantGupta C Oct. 10, 2023, 5:56 a.m. OK GNU C++20 (64) TESTS 12 15 3072000
227439500 lorenzotinfena C Oct. 9, 2023, 5:59 p.m. OK Go TESTS 12 139 35225600
227451233 kiruxan C Oct. 9, 2023, 7:45 p.m. OK Go TESTS 12 202 52531200
227475658 hornedfoe C Oct. 10, 2023, 3:37 a.m. OK Java 11 TESTS 12 187 0
227459755 IceWolf898 C Oct. 9, 2023, 9:44 p.m. OK Java 11 TESTS 12 218 7168000
227454586 gaurav4720 C Oct. 9, 2023, 8:25 p.m. OK Java 11 TESTS 12 233 0
227456193 gaurav4720 C Oct. 9, 2023, 8:46 p.m. OK Java 11 TESTS 12 249 0
227434568 gauravvv2204 C Oct. 9, 2023, 5:25 p.m. OK Java 11 TESTS 12 265 5017600
227468997 Panther369 C Oct. 10, 2023, 1:48 a.m. OK Java 11 TESTS 12 280 5939200
227434755 themadknight45 C Oct. 9, 2023, 5:26 p.m. OK Java 11 TESTS 12 280 6348800
227433198 klu_2100031901 C Oct. 9, 2023, 5:17 p.m. OK Java 11 TESTS 12 280 7884800
227434583 dark_rays C Oct. 9, 2023, 5:25 p.m. OK Java 11 TESTS 12 295 6144000
227430844 TCchen C Oct. 9, 2023, 5:04 p.m. OK Java 11 TESTS 12 327 27750400
227458862 donswick C Oct. 9, 2023, 9:28 p.m. OK Java 17 TESTS 12 343 5222400
227445663 daksh_02 C Oct. 9, 2023, 6:49 p.m. OK Java 17 TESTS 12 358 2150400
227445605 dummypluser C Oct. 9, 2023, 6:49 p.m. OK Java 17 TESTS 12 358 2150400
227433230 Mo.Mostafa2 C Oct. 9, 2023, 5:17 p.m. OK Java 17 TESTS 12 405 10547200
227420758 new2ac C Oct. 9, 2023, 4:31 p.m. OK Java 17 TESTS 12 420 6656000
227423325 sarcaxmic69 C Oct. 9, 2023, 4:34 p.m. OK Java 17 TESTS 12 436 11571200
227422248 sventeen1 C Oct. 9, 2023, 4:33 p.m. OK Java 17 TESTS 12 483 9216000
227424694 LeetCodeforces_Null C Oct. 9, 2023, 4:38 p.m. OK Java 17 TESTS 12 1122 112025600
227445833 GoatTamer C Oct. 9, 2023, 6:51 p.m. OK Java 17 TESTS 12 1372 111718400
227470193 Ligh0x74 C Oct. 10, 2023, 2:11 a.m. OK Java 21 TESTS 12 249 0
227426318 NimiSora C Oct. 9, 2023, 4:44 p.m. OK Java 21 TESTS 12 576 13619200
227448756 vatsal_04 C Oct. 9, 2023, 7:20 p.m. OK Java 8 TESTS 12 140 7372800
227436753 priyaroy3370 C Oct. 9, 2023, 5:40 p.m. OK Java 8 TESTS 12 265 24985600
227447240 American_Eagle C Oct. 9, 2023, 7:05 p.m. OK Java 8 TESTS 12 295 0
227451957 depurador_ik C Oct. 9, 2023, 7:53 p.m. OK Java 8 TESTS 12 343 6348800
227478345 amit_roy C Oct. 10, 2023, 4:17 a.m. OK Java 8 TESTS 12 420 23244800
227437177 arpangoyal_ec20a13_03 C Oct. 9, 2023, 5:44 p.m. OK Java 8 TESTS 12 467 38195200
227460166 ebesso C Oct. 9, 2023, 9:52 p.m. OK PyPy 3 TESTS 12 311 111820800
227442174 iedfa C Oct. 9, 2023, 6:20 p.m. OK PyPy 3 TESTS 12 327 60108800
227430995 amitjoshi24 C Oct. 9, 2023, 5:04 p.m. OK PyPy 3 TESTS 12 374 38297600
227448517 shivananda02 C Oct. 9, 2023, 7:17 p.m. OK PyPy 3 TESTS 12 390 35737600
227444360 k_ano C Oct. 9, 2023, 6:38 p.m. OK PyPy 3 TESTS 12 545 95846400
227441872 Tinky1224 C Oct. 9, 2023, 6:17 p.m. OK PyPy 3-64 TESTS 12 186 66662400
227446774 hehe047 C Oct. 9, 2023, 7 p.m. OK PyPy 3-64 TESTS 12 187 75980800
227425776 RobinFromTheHood C Oct. 9, 2023, 4:42 p.m. OK PyPy 3-64 TESTS 12 202 29696000
227474462 DarkTemplarDrop C Oct. 10, 2023, 3:21 a.m. OK PyPy 3-64 TESTS 12 217 67584000
227483346 Rohan_7503 C Oct. 10, 2023, 5:21 a.m. OK PyPy 3-64 TESTS 12 233 35840000
227442076 Tinky1224 C Oct. 9, 2023, 6:19 p.m. OK PyPy 3-64 TESTS 12 233 66662400
227427644 bothrajat C Oct. 9, 2023, 4:49 p.m. OK PyPy 3-64 TESTS 12 233 67481600
227437643 dark_eldenring C Oct. 9, 2023, 5:47 p.m. OK PyPy 3-64 TESTS 12 264 61952000
227451712 yakisolo C Oct. 9, 2023, 7:51 p.m. OK PyPy 3-64 TESTS 12 264 70451200
227433115 wish-nu C Oct. 9, 2023, 5:16 p.m. OK PyPy 3-64 TESTS 12 265 72601600
227420024 stanislav-iablokov C Oct. 9, 2023, 4:30 p.m. OK Python 3 TESTS 12 264 17920000
227429676 daszybak C Oct. 9, 2023, 4:57 p.m. OK Python 3 TESTS 12 311 25600000
227434059 Shashi_kumar_Vemula C Oct. 9, 2023, 5:22 p.m. OK Python 3 TESTS 12 451 18227200
227427935 Khaild_Salman C Oct. 9, 2023, 4:50 p.m. OK Python 3 TESTS 12 483 18227200
227432405 sullar C Oct. 9, 2023, 5:12 p.m. OK Python 3 TESTS 12 483 18841600
227454492 VioletVal C Oct. 9, 2023, 8:23 p.m. OK Python 3 TESTS 12 545 18227200
227454114 VioletVal C Oct. 9, 2023, 8:18 p.m. OK Python 3 TESTS 12 655 58470400
227480259 gauva_sauce C Oct. 10, 2023, 4:44 a.m. OK Python 3 TESTS 12 670 18022400
227458601 Westin_sheep C Oct. 9, 2023, 9:23 p.m. OK Python 3 TESTS 12 686 56422400
227452165 edugong C Oct. 9, 2023, 7:55 p.m. OK Python 3 TESTS 12 732 11571200
227445359 0npata C Oct. 9, 2023, 6:46 p.m. OK Rust 2021 TESTS 12 15 13414400
227442395 thrombe C Oct. 9, 2023, 6:21 p.m. OK Rust 2021 TESTS 12 31 11673600

remove filters

Back to search problems