Educational Codeforces Round 135 (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
1728 Educational Codeforces Round 135 (Rated for Div. 2) FINISHED False 7200 69175499 Sept. 8, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 16032 ) C Digital Logarithm PROGRAMMING data structures greedy

B"Let's define f(x) for a positive integer x as the length of the base-10 representation of x without leading zeros. I like to call it a digital logarithm. Similar to a digital root, if you are familiar with that. You are given two arrays a and b , each containing n positive integers. In one operation, you do the following: Two arrays are considered similar to each other if you can rearrange the elements in both of them, so that they are equal (e. xe2 x80 x89g. a_i = b_i for all i from 1 to n ). What's the smallest number of operations required to make a and b similar to each other? The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of testcases. The first line of the testcase contains a single integer n ( 1 <= n <= 2 cdot 10^5 ) -- the number of elements in each of the arrays. The second line contains n integers a_1, a_2, ... , a_n ( 1 <= a_i < 10^9 ). The third line contains n integers b_1, b_2, ... , b_n ( 1 <= b_j < 10^9 ). The sum of n over all testcases doesn't exceed 2 cdot 10^5 . For each testcase, print the smallest number of operations required to make a and b similar to each other. In the first testcase, you can apply the digital logarithm to b_1 twice. In the second testcase, the arrays are already similar to each other. In the third testcase, you can first apply the digital logarithm to a_1 , then to b_2 . "...

Tutorials

106805

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
171442321 topmind C Sept. 8, 2022, 7:21 p.m. OK Clang++20 Diagnostics TESTS 16 405 921600
171437569 topmind C Sept. 8, 2022, 6:21 p.m. OK Clang++20 Diagnostics TESTS 11 1201 8396800
171429293 cyrus_msk C Sept. 8, 2022, 5:03 p.m. OK D TESTS 11 312 13721600
171421620 yaohan C Sept. 8, 2022, 4:30 p.m. OK GNU C++14 TESTS 11 124 1638400
171421186 pic_579 C Sept. 8, 2022, 4:29 p.m. OK GNU C++14 TESTS 11 140 3174400
171452701 Sase C Sept. 8, 2022, 11:01 p.m. OK GNU C++14 TESTS 16 140 4710400
171426255 Adityaraj5200 C Sept. 8, 2022, 4:44 p.m. OK GNU C++14 TESTS 11 155 1638400
171471128 K-452b C Sept. 9, 2022, 5:58 a.m. OK GNU C++14 TESTS 21 155 2662400
171467997 James_Bond_OO7 C Sept. 9, 2022, 5:11 a.m. OK GNU C++14 TESTS 21 170 2662400
171427212 ftw010 C Sept. 8, 2022, 4:50 p.m. OK GNU C++14 TESTS 11 170 4403200
171457401 hmanh2007 C Sept. 9, 2022, 1:19 a.m. OK GNU C++14 TESTS 21 171 2662400
171448143 ReimuHakurei C Sept. 8, 2022, 9:02 p.m. OK GNU C++14 TESTS 16 171 2662400
171436623 omi_farhan75 C Sept. 8, 2022, 6:11 p.m. OK GNU C++14 TESTS 11 171 2662400
171439516 Bobocan C Sept. 8, 2022, 6:44 p.m. OK GNU C++17 TESTS 11 31 8601600
171420704 dtd2016 C Sept. 8, 2022, 4:28 p.m. OK GNU C++17 TESTS 11 124 1638400
171465784 wbaidurrahman2000 C Sept. 9, 2022, 4:30 a.m. OK GNU C++17 TESTS 21 139 2457600
171436134 Riblji_Keksic C Sept. 8, 2022, 6:06 p.m. OK GNU C++17 TESTS 11 139 4710400
171460602 loser--007 C Sept. 9, 2022, 2:38 a.m. OK GNU C++17 TESTS 21 140 1638400
171458635 Ioat C Sept. 9, 2022, 1:50 a.m. OK GNU C++17 TESTS 21 140 1638400
171448271 ASPIRINKA C Sept. 8, 2022, 9:05 p.m. OK GNU C++17 TESTS 16 140 1638400
171424582 anubhavrana C Sept. 8, 2022, 4:37 p.m. OK GNU C++17 TESTS 11 140 2662400
171437412 poms647 C Sept. 8, 2022, 6:19 p.m. OK GNU C++17 TESTS 11 140 3174400
171435648 riy C Sept. 8, 2022, 6:01 p.m. OK GNU C++17 TESTS 11 155 1638400
171461956 tachithanhdanh C Sept. 9, 2022, 3:08 a.m. OK GNU C++17 (64) TESTS 21 93 1638400
171462880 tachithanhdanh C Sept. 9, 2022, 3:27 a.m. OK GNU C++17 (64) TESTS 21 93 2048000
171458579 panyanppyy C Sept. 9, 2022, 1:48 a.m. OK GNU C++17 (64) TESTS 21 93 6553600
171462597 tachithanhdanh C Sept. 9, 2022, 3:21 a.m. OK GNU C++17 (64) TESTS 21 108 1638400
171424559 Rh370170 C Sept. 8, 2022, 4:37 p.m. OK GNU C++17 (64) TESTS 11 109 1638400
171462320 tachithanhdanh C Sept. 9, 2022, 3:15 a.m. OK GNU C++17 (64) TESTS 21 109 2457600
171431314 sergey111 C Sept. 8, 2022, 5:19 p.m. OK GNU C++17 (64) TESTS 11 109 3174400
171462297 Mxrush C Sept. 9, 2022, 3:15 a.m. OK GNU C++17 (64) TESTS 21 109 10240000
171459685 LowLightK C Sept. 9, 2022, 2:16 a.m. OK GNU C++17 (64) TESTS 21 124 3174400
171457276 yuhang123 C Sept. 9, 2022, 1:17 a.m. OK GNU C++17 (64) TESTS 21 124 3174400
171451730 hacz2020lyz C Sept. 8, 2022, 10:30 p.m. OK GNU C++20 (64) TESTS 16 78 3174400
171450440 Marco_Escandon C Sept. 8, 2022, 9:57 p.m. OK GNU C++20 (64) TESTS 16 78 3174400
171431920 Nitin1605 C Sept. 8, 2022, 5:25 p.m. OK GNU C++20 (64) TESTS 11 78 3174400
171423242 YassineBY C Sept. 8, 2022, 4:33 p.m. OK GNU C++20 (64) TESTS 11 93 1740800
171456911 HUFUAI C Sept. 9, 2022, 1:06 a.m. OK GNU C++20 (64) TESTS 21 93 2048000
171453516 Swirl C Sept. 8, 2022, 11:27 p.m. OK GNU C++20 (64) TESTS 16 93 4812800
171425179 rangon C Sept. 8, 2022, 4:39 p.m. OK GNU C++20 (64) TESTS 11 93 5734400
171418687 syrgabaev C Sept. 8, 2022, 4:24 p.m. OK GNU C++20 (64) TESTS 11 93 7372800
171428332 barats C Sept. 8, 2022, 4:56 p.m. OK GNU C++20 (64) TESTS 11 93 15052800
171456335 the-other-sunny C Sept. 9, 2022, 12:50 a.m. OK GNU C++20 (64) TESTS 21 108 1638400
171441723 Andreikkaa C Sept. 8, 2022, 7:12 p.m. OK Go TESTS 16 280 7475200
171441891 Andreikkaa C Sept. 8, 2022, 7:14 p.m. OK Go TESTS 16 280 8294400
171441992 Andreikkaa C Sept. 8, 2022, 7:16 p.m. OK Go TESTS 16 280 8396800
171455072 koqo C Sept. 9, 2022, 12:15 a.m. OK Go TESTS 21 514 9932800
171441896 mivael C Sept. 8, 2022, 7:14 p.m. OK Haskell TESTS 16 1123 105062400
171421777 liebigbear C Sept. 8, 2022, 4:30 p.m. OK Java 11 TESTS 11 514 32563200
171447312 prakhars_18 C Sept. 8, 2022, 8:46 p.m. OK Java 11 TESTS 16 514 76697600
171468069 SkadiTheCorruptHeart C Sept. 9, 2022, 5:12 a.m. OK Java 11 TESTS 21 607 11468800
171457216 jhariharan99official C Sept. 9, 2022, 1:15 a.m. OK Java 11 TESTS 21 623 12800000
171429001 doomhammer. C Sept. 8, 2022, 5:01 p.m. OK Java 11 TESTS 11 623 16281600
171455671 Corobo C Sept. 9, 2022, 12:34 a.m. OK Java 11 TESTS 21 623 46080000
171444555 Omar_Mohammad C Sept. 8, 2022, 8:01 p.m. OK Java 11 TESTS 16 624 11468800
171431084 imMortalSuv C Sept. 8, 2022, 5:18 p.m. OK Java 11 TESTS 11 638 36044800
171451011 yudi23 C Sept. 8, 2022, 10:11 p.m. OK Java 11 TESTS 16 639 13516800
171467629 cRuSaDeR C Sept. 9, 2022, 5:05 a.m. OK Java 11 TESTS 21 670 38092800
171419109 pva701 C Sept. 8, 2022, 4:25 p.m. OK Java 17 TESTS 11 530 20480000
171456685 CharonXin C Sept. 9, 2022, 12:59 a.m. OK Java 17 TESTS 21 639 13312000
171455274 CharonXin C Sept. 9, 2022, 12:21 a.m. OK Java 17 TESTS 21 654 12902400
171452236 harman1148 C Sept. 8, 2022, 10:46 p.m. OK Java 17 TESTS 16 670 32460800
171463735 sid234890 C Sept. 9, 2022, 3:45 a.m. OK Java 17 TESTS 21 670 34508800
171438777 Kedrigern C Sept. 8, 2022, 6:35 p.m. OK Java 17 TESTS 11 732 31641600
171447656 AdityaGupta19 C Sept. 8, 2022, 8:53 p.m. OK Java 17 TESTS 16 1014 27750400
171419860 vkukretiwork C Sept. 8, 2022, 4:27 p.m. OK Java 17 TESTS 11 1466 60825600
171420824 C_P_T_N C Sept. 8, 2022, 4:29 p.m. OK Java 8 TESTS 11 343 19148800
171431252 Parimal C Sept. 8, 2022, 5:19 p.m. OK Java 8 TESTS 11 405 28979200
171434074 vinayakrg C Sept. 8, 2022, 5:46 p.m. OK Java 8 TESTS 11 451 29081600
171466274 govindrajput C Sept. 9, 2022, 4:39 a.m. OK Java 8 TESTS 21 451 37171200
171441329 vaibhav_1710 C Sept. 8, 2022, 7:07 p.m. OK Java 8 TESTS 16 452 21708800
171458641 ggghg C Sept. 9, 2022, 1:50 a.m. OK Java 8 TESTS 21 467 31539200
171420714 swarup_312 C Sept. 8, 2022, 4:28 p.m. OK Java 8 TESTS 11 545 17100800
171449532 Unrated_Pritam C Sept. 8, 2022, 9:33 p.m. OK Java 8 TESTS 16 561 45670400
171429735 gssakash C Sept. 8, 2022, 5:07 p.m. OK Java 8 TESTS 11 576 18432000
171427744 amit_roy C Sept. 8, 2022, 4:53 p.m. OK Java 8 TESTS 11 608 40345600
171431558 _gyunghoe_ C Sept. 8, 2022, 5:22 p.m. OK Kotlin 1.6 TESTS 11 592 31129600
171432518 shek_shek C Sept. 8, 2022, 5:31 p.m. OK Kotlin 1.6 TESTS 11 748 10956800
171442678 hamed053 C Sept. 8, 2022, 7:26 p.m. OK MS C++ 2017 TESTS 16 156 1638400
171453105 OmarRnr C Sept. 8, 2022, 11:14 p.m. OK MS C++ 2017 TESTS 16 467 3072000
171432216 adesh123 C Sept. 8, 2022, 5:28 p.m. OK MS C++ 2017 TESTS 11 514 4915200
171447025 Nobdefender C Sept. 8, 2022, 8:40 p.m. OK MS C++ 2017 TESTS 16 608 35328000
171427067 Ash_2k C Sept. 8, 2022, 4:49 p.m. OK MS C++ 2017 TESTS 11 624 2457600
171454568 glyce C Sept. 9, 2022, midnight OK MS C++ 2017 TESTS 16 624 25804800
171451457 oadey89 C Sept. 8, 2022, 10:23 p.m. OK PyPy 2 TESTS 16 467 61747200
171471317 wincss C Sept. 9, 2022, 6:01 a.m. OK PyPy 2 TESTS 21 935 86937600
171451235 orangeme C Sept. 8, 2022, 10:17 p.m. OK PyPy 3 TESTS 16 811 22118400
171438438 KeiTsukishima C Sept. 8, 2022, 6:30 p.m. OK PyPy 3 TESTS 11 841 36249600
171449428 Gulu_Gulu C Sept. 8, 2022, 9:31 p.m. OK PyPy 3 TESTS 16 904 71987200
171442053 del-user-774348 C Sept. 8, 2022, 7:16 p.m. OK PyPy 3 TESTS 16 950 19968000
171463530 tan_delhi C Sept. 9, 2022, 3:41 a.m. OK PyPy 3 TESTS 21 1091 50790400
171456168 ZH_twinkle C Sept. 9, 2022, 12:46 a.m. OK PyPy 3 TESTS 21 1902 22220800
171438213 tony_lenc_ C Sept. 8, 2022, 6:28 p.m. OK PyPy 3-64 TESTS 11 202 28774400
171464853 Solaca C Sept. 9, 2022, 4:09 a.m. OK PyPy 3-64 TESTS 21 265 32563200
171441646 moyung C Sept. 8, 2022, 7:11 p.m. OK PyPy 3-64 TESTS 16 265 32972800
171470574 Yansou C Sept. 9, 2022, 5:50 a.m. OK PyPy 3-64 TESTS 21 280 39936000
171464349 alex391a C Sept. 9, 2022, 3:58 a.m. OK PyPy 3-64 TESTS 21 327 40550400
171464235 alex391a C Sept. 9, 2022, 3:55 a.m. OK PyPy 3-64 TESTS 21 327 41472000
171421199 blue_ice_yj C Sept. 8, 2022, 4:29 p.m. OK PyPy 3-64 TESTS 11 342 47308800
171464210 alex391a C Sept. 9, 2022, 3:55 a.m. OK PyPy 3-64 TESTS 21 389 50892800
171449888 Viper35 C Sept. 8, 2022, 9:43 p.m. OK PyPy 3-64 TESTS 16 436 60416000
171461302 InariInDream C Sept. 9, 2022, 2:53 a.m. OK PyPy 3-64 TESTS 21 436 60620800
171469133 pratyanch_jain C Sept. 9, 2022, 5:28 a.m. OK Python 3 TESTS 21 873 38502400
171442204 ssarwarbd C Sept. 8, 2022, 7:19 p.m. OK Python 3 TESTS 16 889 19763200
171464386 alex391a C Sept. 9, 2022, 3:59 a.m. OK Python 3 TESTS 21 889 34816000
171439180 NenadDapic C Sept. 8, 2022, 6:39 p.m. OK Python 3 TESTS 11 951 20582400
171428166 Utkarshg001 C Sept. 8, 2022, 4:55 p.m. OK Python 3 TESTS 11 982 20992000
171420093 hany.elnokaly C Sept. 8, 2022, 4:27 p.m. OK Python 3 TESTS 11 1169 20889600
171438607 NenadDapic C Sept. 8, 2022, 6:32 p.m. OK Python 3 TESTS 11 1294 19865600
171451971 mohanned_war C Sept. 8, 2022, 10:38 p.m. OK Python 3 TESTS 16 1434 29081600
171460875 ZrjaK C Sept. 9, 2022, 2:44 a.m. OK Python 3 TESTS 21 1513 20480000
171439137 2009amit0509 C Sept. 8, 2022, 6:39 p.m. OK Python 3 TESTS 11 1543 20172800
171459248 Spheniscine C Sept. 9, 2022, 2:05 a.m. OK Rust 2021 TESTS 21 93 18841600
171426650 Hyrulia C Sept. 8, 2022, 4:46 p.m. OK Rust 2021 TESTS 11 124 10547200

remove filters

Back to search problems