Educational Codeforces Round 115 (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
1598 Educational Codeforces Round 115 (Rated for Div. 2) FINISHED False 7200 103409663 Oct. 10, 2021, 9:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 348 ) G The Sum of Good Numbers PROGRAMMING hashing probabilities

B"Let's call a positive integer good if there is no digit 0 in its decimal representation. For an array of a good numbers a , one found out that the sum of some two neighboring elements is equal to x (i.e. x = a_i + a_{i + 1} for some i ). x had turned out to be a good number as well. Then the elements of the array a were written out one after another without separators into one string s . For example, if a = [12, 5, 6, 133] , then s = 1256133 . You are given a string s and a number x . Your task is to determine the positions in the string that correspond to the adjacent elements of the array that have sum x . If there are several possible answers, you can print any of them. The first line contains the string s ( 2 <= |s| <= 5 cdot 10^5 ). The second line contains an integer x ( 2 <= x < 10^{200000} ). An additional constraint on the input: the answer always exists, i.e you can always select two adjacent substrings of the string s so that if you convert these substrings to integers, their sum is equal to x . In the first line, print two integers l_1 , r_1 , meaning that the first term of the sum ( a_i ) is in the string s from position l_1 to position r_1 . In the second line, print two integers l_2 , r_2 , meaning that the second term of the sum ( a_{i + 1} ) is in the string s from position l_2 to position r_2 . In the first example s[1;2] = 12 and s[3;3] = 5 , 12+5=17 . In the second example s[2;3] = 54 and s[4;6] = 471 , 54+471=525 . In the third example s[1;1] = 2 and s[2;2] = 3 , 2+3=5 . In the fourth example s[2;7] = 218633 and s[8;13] = 757639 , 218633+757639=976272 . "...

Tutorials

95890

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
131487522 rainboy G Oct. 10, 2021, 5:15 p.m. OK GNU C11 TESTS 93 763 50278400
131517334 LYC_music G Oct. 11, 2021, 5:35 a.m. OK GNU C++14 TESTS 94 187 69836800
131458159 halyavin G Oct. 10, 2021, 11:40 a.m. OK GNU C++17 TESTS 93 77 30105600
131474021 Vercingetorix G Oct. 10, 2021, 2:30 p.m. OK GNU C++17 TESTS 93 187 52633600
131456381 chemthan G Oct. 10, 2021, 11:26 a.m. OK GNU C++17 TESTS 93 1528 76185600
131456620 chemthan G Oct. 10, 2021, 11:27 a.m. OK GNU C++17 TESTS 93 1965 103321600
131460869 hina_amano G Oct. 10, 2021, 12:08 p.m. OK GNU C++17 (64) TESTS 93 124 98816000
131515676 Fysty G Oct. 11, 2021, 5:10 a.m. OK GNU C++17 (64) TESTS 94 171 19353600
131461297 hina_amano G Oct. 10, 2021, 12:13 p.m. OK GNU C++17 (64) TESTS 93 186 98816000
131467992 Alan233 G Oct. 10, 2021, 1:25 p.m. OK GNU C++17 (64) TESTS 93 217 24985600
131517066 Kuroni G Oct. 11, 2021, 5:31 a.m. OK GNU C++17 (64) TESTS 94 280 41369600
131512902 He_Ren G Oct. 11, 2021, 4:19 a.m. OK GNU C++17 (64) TESTS 93 576 54169600
131461247 hina_amano G Oct. 10, 2021, 12:12 p.m. OK GNU C++17 (64) TESTS 93 810 98816000
131499537 Pa_sha G Oct. 10, 2021, 8:40 p.m. OK GNU C++17 (64) TESTS 93 1466 39014400
131464536 Lawali G Oct. 10, 2021, 12:48 p.m. OK GNU C++17 (64) TESTS 93 1466 39014400
131464276 Lawali G Oct. 10, 2021, 12:45 p.m. OK GNU C++17 (64) TESTS 93 1747 39014400

remove filters

Back to search problems