Codeforces Round 820 (Div. 3)

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
1729 Codeforces Round 820 (Div. 3) FINISHED False 8100 68829899 Sept. 12, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4184 ) F Kirei and the Linear Function PROGRAMMING brute force math

B'Given the string s of decimal digits (0-9) of length n . A substring is a sequence of consecutive characters of a string. The substring of this string is defined by a pair of indexes -- with its left and right ends. So, each pair of indexes ( l, r ), where 1 <= l <= r <= n , corresponds to a substring of the string s . We will define as v(l,r) the numeric value of the corresponding substring (leading zeros are allowed in it). For example, if n=7 , s= "1003004", then v(1,3)=100 , v(2,3)=0 and v(2,7)=3004 . You are given n , s and an integer w ( 1 <= w < n ). You need to process m queries, each of which is characterized by 3 numbers l_i, r_i, k_i ( 1 <= l_i <= r_i <= n; 0 <= k_i <= 8 ). The answer to the i th query is such a pair of substrings of length w that if we denote them as (L_1, L_1+w-1) and (L_2, L_2+w-1) , then: If there are many matching substring pairs, then find a pair where L_1 is as small as possible. If there are many matching pairs in this case, then minimize L_2 . Note that the answer may not exist. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- number of input test cases. The first line of each test case contains a string s , which contains only the characters 0-9 and has a length n ( 2 <= n <= 2 cdot 10^5 ). The second line contains two integers w, m ( 1 <= w < n, 1 <= m <= 2 cdot 10^5 ), where n -- is the length of the given string s . The number w denotes the lengths of the substrings being searched for, and m is the number of queries to be processed. The following m lines contain integers l_i, r_i, k_i ( 1 <= l_i <= r_i <= n , 0 <= k_i <= 8 ) -- i th query parameters. It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . It is also gu'...

Tutorials

Codeforces Round #820 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
171945015 mban259 F Sept. 12, 2022, 4:51 p.m. OK C# 10 TESTS 20 249 15564800
171979372 WR_Eternity_ F Sept. 13, 2022, 12:50 a.m. OK GNU C++14 TESTS 21 140 1843200
171978264 magicworld F Sept. 13, 2022, 12:19 a.m. OK GNU C++14 TESTS 21 140 4096000
171982821 CrazyTeaMajor F Sept. 13, 2022, 2:18 a.m. OK GNU C++14 TESTS 21 140 6553600
171982342 Bob_Wang F Sept. 13, 2022, 2:05 a.m. OK GNU C++14 TESTS 21 171 1740800
171986317 zxtikes F Sept. 13, 2022, 3:32 a.m. OK GNU C++14 TESTS 21 171 2560000
171980042 Cr45hor F Sept. 13, 2022, 1:08 a.m. OK GNU C++14 TESTS 21 186 1331200
171961900 fexla F Sept. 12, 2022, 6:47 p.m. OK GNU C++14 TESTS 20 186 1331200
171963406 fexla F Sept. 12, 2022, 7:03 p.m. OK GNU C++14 TESTS 20 187 1331200
171962946 fexla F Sept. 12, 2022, 6:58 p.m. OK GNU C++14 TESTS 20 187 1331200
171962916 fexla F Sept. 12, 2022, 6:58 p.m. OK GNU C++14 TESTS 20 187 1331200
171951247 Gold_Dragon F Sept. 12, 2022, 5:17 p.m. OK GNU C++17 TESTS 20 140 1740800
171956414 SajibKC_19 F Sept. 12, 2022, 5:55 p.m. OK GNU C++17 TESTS 20 155 1740800
171946170 pcmferreira F Sept. 12, 2022, 4:55 p.m. OK GNU C++17 TESTS 20 155 2560000
171948660 kodewala F Sept. 12, 2022, 5:05 p.m. OK GNU C++17 TESTS 20 155 2662400
171946968 lrb666 F Sept. 12, 2022, 4:58 p.m. OK GNU C++17 TESTS 20 156 1126400
171947618 Bros_forces F Sept. 12, 2022, 5:01 p.m. OK GNU C++17 TESTS 20 156 6553600
171981342 akshat_vaya F Sept. 13, 2022, 1:42 a.m. OK GNU C++17 TESTS 21 171 4403200
171949099 anson370 F Sept. 12, 2022, 5:07 p.m. OK GNU C++17 TESTS 20 186 2457600
171947268 Nikich F Sept. 12, 2022, 4:59 p.m. OK GNU C++17 TESTS 20 186 2560000
171982764 SamuNatsu F Sept. 13, 2022, 2:16 a.m. OK GNU C++17 TESTS 21 186 3379200
171980758 yaoveil F Sept. 13, 2022, 1:27 a.m. OK GNU C++17 (64) TESTS 21 140 2457600
171992195 drdilyor F Sept. 13, 2022, 5:14 a.m. OK GNU C++17 (64) TESTS 21 140 2662400
171981861 walk_alone F Sept. 13, 2022, 1:55 a.m. OK GNU C++17 (64) TESTS 21 155 1331200
171979077 User_Carrot F Sept. 13, 2022, 12:42 a.m. OK GNU C++17 (64) TESTS 21 155 1331200
171954881 KevinyWu F Sept. 12, 2022, 5:43 p.m. OK GNU C++17 (64) TESTS 20 155 2457600
171979443 cloudflow F Sept. 13, 2022, 12:53 a.m. OK GNU C++17 (64) TESTS 21 155 5120000
171973226 enslaved F Sept. 12, 2022, 9:39 p.m. OK GNU C++17 (64) TESTS 21 155 5836800
171957762 lukameladze1 F Sept. 12, 2022, 6:07 p.m. OK GNU C++17 (64) TESTS 20 155 10137600
171951136 lukameladze1 F Sept. 12, 2022, 5:17 p.m. OK GNU C++17 (64) TESTS 20 155 10137600
171956803 ZiadEl-Gafy F Sept. 12, 2022, 5:59 p.m. OK GNU C++17 (64) TESTS 20 156 2662400
171985068 BaoJiaoPisu F Sept. 13, 2022, 3:06 a.m. OK GNU C++20 (64) TESTS 21 93 2150400
171950274 russian_proger F Sept. 12, 2022, 5:12 p.m. OK GNU C++20 (64) TESTS 20 93 2150400
171986913 sangam432 F Sept. 13, 2022, 3:45 a.m. OK GNU C++20 (64) TESTS 21 108 6144000
171985240 pro_chinkkkk F Sept. 13, 2022, 3:10 a.m. OK GNU C++20 (64) TESTS 21 109 1331200
171973554 sixty-ene-yne F Sept. 12, 2022, 9:47 p.m. OK GNU C++20 (64) TESTS 21 109 1331200
171973425 sixty-ene-yne F Sept. 12, 2022, 9:44 p.m. OK GNU C++20 (64) TESTS 21 109 1331200
171947715 DDeshka F Sept. 12, 2022, 5:01 p.m. OK GNU C++20 (64) TESTS 20 109 2150400
171990193 rihonei F Sept. 13, 2022, 4:43 a.m. OK GNU C++20 (64) TESTS 21 109 2457600
171981182 zzwtz2333 F Sept. 13, 2022, 1:39 a.m. OK GNU C++20 (64) TESTS 21 109 2457600
171949323 zydhanlinnar11 F Sept. 12, 2022, 5:08 p.m. OK GNU C++20 (64) TESTS 20 109 5017600
171946854 dunkingdonuts F Sept. 12, 2022, 4:58 p.m. OK Java 11 TESTS 20 327 2662400
171994748 super_geek F Sept. 13, 2022, 5:50 a.m. OK Java 11 TESTS 21 467 4300800
171970440 tushar19280 F Sept. 12, 2022, 8:42 p.m. OK Java 11 TESTS 21 654 3788800
171992681 Violet_Ever_Garden F Sept. 13, 2022, 5:21 a.m. OK Java 17 TESTS 21 639 3788800
171950094 liomsv F Sept. 12, 2022, 5:11 p.m. OK Java 17 TESTS 20 1045 716800
171995453 soumit915 F Sept. 13, 2022, 5:59 a.m. OK Java 17 TESTS 21 1388 6451200
171989740 Violet_Ever_Garden F Sept. 13, 2022, 4:35 a.m. OK Java 17 TESTS 21 1794 3993600
171949048 gagan_6730 F Sept. 12, 2022, 5:07 p.m. OK Java 8 TESTS 20 296 3174400
171949254 NerfThis F Sept. 12, 2022, 5:07 p.m. OK Java 8 TESTS 20 327 0
171958036 peiyeliu F Sept. 12, 2022, 6:09 p.m. OK Java 8 TESTS 20 327 3686400
171947860 vipulm7 F Sept. 12, 2022, 5:02 p.m. OK Java 8 TESTS 20 467 4403200
171992599 Violet_Ever_Garden F Sept. 13, 2022, 5:20 a.m. OK Java 8 TESTS 21 545 1024000
171992966 ikillmyself F Sept. 13, 2022, 5:25 a.m. OK Java 8 TESTS 21 623 10649600
171992447 Violet_Ever_Garden F Sept. 13, 2022, 5:17 a.m. OK Java 8 TESTS 21 1185 1024000
171989767 Violet_Ever_Garden F Sept. 13, 2022, 4:36 a.m. OK Java 8 TESTS 21 1809 1024000
171970620 den1107 F Sept. 12, 2022, 8:45 p.m. OK Kotlin 1.4 TESTS 21 529 7680000
171949770 sky F Sept. 12, 2022, 5:10 p.m. OK Kotlin 1.6 TESTS 20 2230 7065600
171989129 6ziv F Sept. 13, 2022, 4:25 a.m. OK MS C++ 2017 TESTS 21 187 204800
171977679 KKastaneda F Sept. 13, 2022, 12:01 a.m. OK MS C++ 2017 TESTS 21 1263 2560000
171947131 soraemonpockt F Sept. 12, 2022, 4:59 p.m. OK PyPy 3 TESTS 20 1154 11571200
171947562 chuzhumin98-2 F Sept. 12, 2022, 5 p.m. OK PyPy 3 TESTS 20 2745 12697600
171972137 Aksnov F Sept. 12, 2022, 9:15 p.m. OK PyPy 3-64 TESTS 21 311 17612800
171994230 USYDLDH F Sept. 13, 2022, 5:43 a.m. OK PyPy 3-64 TESTS 21 312 19558400
171951778 blue_ice_yj F Sept. 12, 2022, 5:21 p.m. OK PyPy 3-64 TESTS 20 342 18636800
171969382 hash1023 F Sept. 12, 2022, 8:24 p.m. OK PyPy 3-64 TESTS 21 358 36249600
171987116 bridgekiller F Sept. 13, 2022, 3:49 a.m. OK PyPy 3-64 TESTS 21 389 15360000
171988108 KA_Rma F Sept. 13, 2022, 4:09 a.m. OK PyPy 3-64 TESTS 21 404 13004800
171989491 nicku123 F Sept. 13, 2022, 4:31 a.m. OK PyPy 3-64 TESTS 21 405 16384000
171987144 bridgekiller F Sept. 13, 2022, 3:50 a.m. OK PyPy 3-64 TESTS 21 420 16076800
171972179 Aksnov F Sept. 12, 2022, 9:16 p.m. OK PyPy 3-64 TESTS 21 421 17612800
171987362 bridgekiller F Sept. 13, 2022, 3:55 a.m. OK PyPy 3-64 TESTS 21 452 16076800
171969359 hash1023 F Sept. 12, 2022, 8:23 p.m. OK Python 3 TESTS 21 1918 18636800
171989617 kovi05007 F Sept. 13, 2022, 4:33 a.m. OK Python 3 TESTS 21 2979 2150400
171961975 liut F Sept. 12, 2022, 6:48 p.m. OK Rust 2021 TESTS 20 109 3481600
171981121 kena0ki F Sept. 13, 2022, 1:37 a.m. OK Rust 2021 TESTS 21 109 3993600
171955775 liut F Sept. 12, 2022, 5:51 p.m. OK Rust 2021 TESTS 20 140 3584000
171950055 robostac F Sept. 12, 2022, 5:11 p.m. OK Rust 2021 TESTS 20 389 74240000
171949431 robostac F Sept. 12, 2022, 5:08 p.m. OK Rust 2021 TESTS 20 2105 4915200

remove filters

Back to search problems