Educational Codeforces Round 186 (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
2182 Educational Codeforces Round 186 (Rated for Div. 2) FINISHED False 7200 9386723 Dec. 29, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 23264 ) B New Year Cake PROGRAMMING brute force implementation

Monocarp is going to bake a New Year cake. The cake must consist of at least one layer. The size of the top layer of the cake must be (1); the size of the layer below it must be (2); the layer below that must be (4), and so on (each layer, except for the top one, is twice the size of the layer above it). Additionally, each layer must be covered with either white or dark chocolate. To cover a layer of size (k), Monocarp will need (k) kilograms of chocolate. Each layer must be covered with exactly one type of chocolate, and these types must alternate (if some layer is covered with dark chocolate, both the layer directly below it and the layer directly above it must be covered with white chocolate, and vice versa). Monocarp has (a) kilograms of white chocolate and (b) kilograms of dark chocolate. He wants to calculate the maximum number of layers that the cake can consist of, ensuring that he has enough chocolate of both types. The first line contains one integer (t) ((1 \le t \le 10^4)) — the number of test cases. Each test case consists of one line containing two integers (a) and (b) ((1 \le a, b \le 10^6)). For each test case, output one integer — the maximum possible number of layers in the cake. In the first example, Monocarp can bake a cake with one layer of size (1) and cover it with any type of chocolate. In the second example, Monocarp can bake a cake with two layers: the top layer of size (1) with white chocolate, and below it a layer of size (2) with dark chocolate. In the third example, Monocarp can bake a cake with two layers: the top layer of size (1) with dark chocolate, and below it a layer of size (2) with white chocolate. In the fourth example, Monocarp can bake a cake with two layers: the top layer of size (1) with dark chocolate, and below it a layer of size (2) with white chocolate. Note that a cake with three layers, where the top layer of size (1) and the la

Tutorials

Educational Codeforces Round 186 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
355830063 ya_hossein B Dec. 30, 2025, 5:08 a.m. OK C# 13 TESTS 4 62 3072000
355914188 kanishkjindal2006 B Dec. 30, 2025, 6:36 p.m. OK C++17 (GCC 7-32) TESTS 4 15 0
355882715 fluffkins B Dec. 30, 2025, 2:04 p.m. OK C++17 (GCC 7-32) TESTS 4 15 0
355877221 Xiao_Yu B Dec. 30, 2025, 1:17 p.m. OK C++17 (GCC 7-32) TESTS 4 15 0
355875378 sqrt73 B Dec. 30, 2025, 1 p.m. OK C++17 (GCC 7-32) TESTS 4 15 0
355867327 aryan4995 B Dec. 30, 2025, 11:42 a.m. OK C++17 (GCC 7-32) TESTS 4 15 0
355864403 hhzhexuejia B Dec. 30, 2025, 11:16 a.m. OK C++17 (GCC 7-32) TESTS 4 15 0
355858425 aniketjaiswal_iitp B Dec. 30, 2025, 10:21 a.m. OK C++17 (GCC 7-32) TESTS 4 15 0
355857660 professorik B Dec. 30, 2025, 10:14 a.m. OK C++17 (GCC 7-32) TESTS 4 15 0
355850552 renegade1050 B Dec. 30, 2025, 9:05 a.m. OK C++17 (GCC 7-32) TESTS 4 15 0
355848603 Luankk B Dec. 30, 2025, 8:46 a.m. OK C++17 (GCC 7-32) TESTS 4 15 0
355853468 vishad.jain.07 B Dec. 30, 2025, 9:33 a.m. OK C++20 (GCC 13-64) TESTS 4 0 102400
355913651 Harsh_maheriya B Dec. 30, 2025, 6:30 p.m. OK C++20 (GCC 13-64) TESTS 4 15 0
355908075 priyanshuraj979837 B Dec. 30, 2025, 5:41 p.m. OK C++20 (GCC 13-64) TESTS 4 15 0
355880176 black_panther_12 B Dec. 30, 2025, 1:42 p.m. OK C++20 (GCC 13-64) TESTS 4 15 0
355873633 ananya. B Dec. 30, 2025, 12:44 p.m. OK C++20 (GCC 13-64) TESTS 4 15 0
355851340 M_mohan B Dec. 30, 2025, 9:13 a.m. OK C++20 (GCC 13-64) TESTS 4 15 0
355839840 chronostar B Dec. 30, 2025, 7:25 a.m. OK C++20 (GCC 13-64) TESTS 4 15 0
355825567 Ka_shah1234 B Dec. 30, 2025, 3:48 a.m. OK C++20 (GCC 13-64) TESTS 4 15 0
355815218 djsksbrbf B Dec. 29, 2025, 11:17 p.m. OK C++20 (GCC 13-64) TESTS 4 15 0
355801540 Nir0xVan B Dec. 29, 2025, 7:09 p.m. OK C++20 (GCC 13-64) TESTS 4 15 0
355932486 The__Alchemist B Dec. 31, 2025, 1:09 a.m. OK C++23 (GCC 14-64, msys2) TESTS 4 15 0
355912205 Mehul_Mehta B Dec. 30, 2025, 6:17 p.m. OK C++23 (GCC 14-64, msys2) TESTS 4 15 0
355905385 Afeef_ B Dec. 30, 2025, 5:19 p.m. OK C++23 (GCC 14-64, msys2) TESTS 4 15 0
355896237 cobugi B Dec. 30, 2025, 4:02 p.m. OK C++23 (GCC 14-64, msys2) TESTS 4 15 0
355895052 ami_ovee37 B Dec. 30, 2025, 3:52 p.m. OK C++23 (GCC 14-64, msys2) TESTS 4 15 0
355893997 aviralx B Dec. 30, 2025, 3:43 p.m. OK C++23 (GCC 14-64, msys2) TESTS 4 15 0
355891826 Lyr1c B Dec. 30, 2025, 3:25 p.m. OK C++23 (GCC 14-64, msys2) TESTS 4 15 0
355887020 anandcool678 B Dec. 30, 2025, 2:42 p.m. OK C++23 (GCC 14-64, msys2) TESTS 4 15 0
355881932 afsarrrr B Dec. 30, 2025, 1:57 p.m. OK C++23 (GCC 14-64, msys2) TESTS 4 15 0
355878842 SDTBU_NQH jk24214351 B Dec. 30, 2025, 1:30 p.m. OK C++23 (GCC 14-64, msys2) TESTS 4 15 0
355892234 saimanas_1109 B Dec. 30, 2025, 3:29 p.m. OK GNU C11 TESTS 4 46 0
355872247 itzrushilsharma B Dec. 30, 2025, 12:30 p.m. OK GNU C11 TESTS 4 46 0
355849962 Coderhacks16 B Dec. 30, 2025, 8:59 a.m. OK GNU C11 TESTS 4 46 0
355834023 SAZID_X_MMA B Dec. 30, 2025, 6:12 a.m. OK GNU C11 TESTS 4 46 0
355859736 sathvikpvpsit B Dec. 30, 2025, 10:34 a.m. OK GNU C11 TESTS 4 46 102400
355910928 nashedi1212 B Dec. 30, 2025, 6:05 p.m. OK GNU C11 TESTS 4 62 0
355903129 hemenlahkar B Dec. 30, 2025, 5 p.m. OK GNU C11 TESTS 4 62 0
355890292 24je0160 B Dec. 30, 2025, 3:11 p.m. OK GNU C11 TESTS 4 62 0
355889458 shield137 B Dec. 30, 2025, 3:04 p.m. OK GNU C11 TESTS 4 62 0
355873716 ShenDev B Dec. 30, 2025, 12:45 p.m. OK GNU C11 TESTS 4 62 0
355856552 leo_18_2022 B Dec. 30, 2025, 10:03 a.m. OK Go TESTS 4 31 307200
355855371 Leeeee B Dec. 30, 2025, 9:52 a.m. OK Go TESTS 4 46 102400
355823099 Haven_ B Dec. 30, 2025, 2:59 a.m. OK Go TESTS 4 46 307200
355854294 glebsamsonov B Dec. 30, 2025, 9:41 a.m. OK Go TESTS 4 62 102400
355819549 daoqi B Dec. 30, 2025, 1:36 a.m. OK Go TESTS 4 62 307200
355924945 mohanys B Dec. 30, 2025, 9:19 p.m. OK Go TESTS 4 78 716800
355826035 santhu30304 B Dec. 30, 2025, 3:58 a.m. OK Java 21 TESTS 4 156 307200
355850515 AviNlogN B Dec. 30, 2025, 9:04 a.m. OK Java 21 TESTS 4 156 614400
355859633 Rctej B Dec. 30, 2025, 10:33 a.m. OK Java 21 TESTS 4 171 0
355900300 BitHunter_65_ B Dec. 30, 2025, 4:35 p.m. OK Java 21 TESTS 4 171 102400
355901036 Ujjal_roy B Dec. 30, 2025, 4:42 p.m. OK Java 21 TESTS 4 187 102400
355912100 tanmay1838 B Dec. 30, 2025, 6:16 p.m. OK Java 21 TESTS 4 187 204800
355910469 _Abhinavv_ B Dec. 30, 2025, 6:01 p.m. OK Java 21 TESTS 4 187 614400
355933894 pothyne B Dec. 31, 2025, 1:53 a.m. OK Java 21 TESTS 4 203 409600
355929750 dzhi B Dec. 30, 2025, 11:30 p.m. OK Java 21 TESTS 4 203 614400
355863042 sriram_18 B Dec. 30, 2025, 11:04 a.m. OK Java 21 TESTS 4 203 921600
355847256 arnaw34 B Dec. 30, 2025, 8:34 a.m. OK Java 8 TESTS 4 93 0
355934398 24501a05k4 B Dec. 31, 2025, 2:10 a.m. OK Java 8 TESTS 4 109 0
355799219 golions B Dec. 29, 2025, 6:44 p.m. OK Java 8 TESTS 4 125 0
355941356 krishnandu01 B Dec. 31, 2025, 4:36 a.m. OK Java 8 TESTS 4 156 0
355910329 24501a05l8 B Dec. 30, 2025, 6 p.m. OK Java 8 TESTS 4 156 0
355829563 prachilakha B Dec. 30, 2025, 5 a.m. OK Java 8 TESTS 4 156 0
355825495 chengzijun_de_xiatian B Dec. 30, 2025, 3:46 a.m. OK Java 8 TESTS 4 156 0
355940571 charitha161 B Dec. 31, 2025, 4:21 a.m. OK Java 8 TESTS 4 171 0
355829318 prachilakha B Dec. 30, 2025, 4:56 a.m. OK Java 8 TESTS 4 171 0
355801380 Parth63 B Dec. 29, 2025, 7:08 p.m. OK Java 8 TESTS 4 171 0
355868615 DmitriyT B Dec. 30, 2025, 11:55 a.m. OK Kotlin 2.2 TESTS 4 203 204800
355903303 tpsmacho B Dec. 30, 2025, 5:02 p.m. OK Node.js TESTS 4 187 10137600
355879490 astro_new B Dec. 30, 2025, 1:36 p.m. OK Node.js TESTS 4 203 9728000
355817552 lifenghei B Dec. 30, 2025, 12:26 a.m. OK PyPy 3 TESTS 4 156 4915200
355920514 soliditydeveloper B Dec. 30, 2025, 7:57 p.m. OK PyPy 3 TESTS 4 203 8601600
355938328 Ayyylmao B Dec. 31, 2025, 3:31 a.m. OK PyPy 3 TESTS 4 265 9728000
355876122 lightningskipper B Dec. 30, 2025, 1:07 p.m. OK PyPy 3 TESTS 4 312 8499200
355914208 TemaSaur B Dec. 30, 2025, 6:36 p.m. OK PyPy 3-64 TESTS 4 62 4300800
355794995 aa_despa B Dec. 29, 2025, 6:03 p.m. OK PyPy 3-64 TESTS 4 78 2867200
355940679 sigmahimu999 B Dec. 31, 2025, 4:23 a.m. OK PyPy 3-64 TESTS 4 78 2969600
355838901 gardengnome B Dec. 30, 2025, 7:15 a.m. OK PyPy 3-64 TESTS 4 78 3481600
355838797 gujiu B Dec. 30, 2025, 7:14 a.m. OK PyPy 3-64 TESTS 4 78 4198400
355861368 eeyoowan B Dec. 30, 2025, 10:48 a.m. OK PyPy 3-64 TESTS 4 78 4403200
355807843 OmarMoBadr B Dec. 29, 2025, 8:35 p.m. OK PyPy 3-64 TESTS 4 78 4403200
355801584 AKIDNAR B Dec. 29, 2025, 7:10 p.m. OK PyPy 3-64 TESTS 4 78 5017600
355941122 JOhuashu B Dec. 31, 2025, 4:32 a.m. OK PyPy 3-64 TESTS 4 93 2969600
355883880 shashankvinakota25 B Dec. 30, 2025, 2:14 p.m. OK PyPy 3-64 TESTS 4 93 3379200
355919324 rezoeris B Dec. 30, 2025, 7:38 p.m. OK Python 3 TESTS 4 78 204800
355842175 Azusa B Dec. 30, 2025, 7:46 a.m. OK Python 3 TESTS 4 78 1228800
355824448 VSS402002_Muhammad_Adil B Dec. 30, 2025, 3:25 a.m. OK Python 3 TESTS 4 78 2764800
355853329 himanshu174 B Dec. 30, 2025, 9:32 a.m. OK Python 3 TESTS 4 93 0
355931049 Daniiiiiil B Dec. 31, 2025, 12:23 a.m. OK Python 3 TESTS 4 93 102400
355882067 Yussef_Khaled B Dec. 30, 2025, 1:58 p.m. OK Python 3 TESTS 4 93 102400
355869305 KovaCro B Dec. 30, 2025, 12:01 p.m. OK Python 3 TESTS 4 93 102400
355811557 rzavalet B Dec. 29, 2025, 9:50 p.m. OK Python 3 TESTS 4 93 102400
355794684 vrbharadwaj28 B Dec. 29, 2025, 6 p.m. OK Python 3 TESTS 4 93 102400
355794147 JoseIGF29 B Dec. 29, 2025, 5:55 p.m. OK Python 3 TESTS 4 93 102400
355940864 Spheniscine B Dec. 31, 2025, 4:27 a.m. OK Rust 2021 TESTS 4 15 102400
355820892 chreh B Dec. 30, 2025, 2:15 a.m. OK Rust 2024 TESTS 4 31 0
355937255 hirose2020 B Dec. 31, 2025, 3:12 a.m. OK Rust 2024 TESTS 4 46 0

remove filters

Back to search problems