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
( 1081 ) F2 Christmas Reindeer (hard version) PROGRAMMING bitmasks combinatorics dp

This is the hard version of the problem. The only difference between the versions is the upper bound on (n) and (m). In this version, (n \le 3 \cdot 10^5) and (m \le 3 \cdot 10^5). You have a herd of (n) Christmas reindeer. The strength of the (i)-th reindeer is (2^{c_i}). The carrying capacity of a group of (k) Christmas reindeer is calculated as follows: the strengths of the reindeer are sorted in non-increasing order. Let's denote the sorted list of strengths as (c'_1, c'_2, \dots, c'_k), where (c'_i \ge c'_{i+1}); then, the carrying capacity of this group of reindeer is equal to (c'_1 + \lfloor\frac{c'_2}{2}\rfloor + \lfloor\frac{c'_3}{4}\rfloor + \dots + \lfloor\frac{c'_k}{2^{k - 1}}\rfloor). Note that some reindeer may contribute zero to the carrying capacity of the group. You have to process queries of three types: add a reindeer with strength equal to (2^x) to the herd; remove a reindeer with strength equal to (2^x) from the herd of reindeer; calculate the number of ways to choose some of the reindeer from the herd (possibly all of them) so that the carrying capacity of the chosen group is at least (x) . If there are multiple reindeer with the same strength in the herd, they are considered different. For example, if you have two reindeer with strength (1) each, and you need to calculate the number of ways to choose a group with carrying capacity of at least (1), there are (3) ways to choose it: choose the first reindeer, the second reindeer, or both of them. The first line contains two integers (n) and (m) ((1 \le n, m \le 3 \cdot 10^5)) — the initial number of reindeer in the herd and the number of queries, respectively. The second line contains (n) integers (c_1, c_2, \dots, c_n) ((0 \le c_i \le 60)) denoting the strengths of the reindeer in the herd: the strength of the (i)-th reindeer is (2^{c_i}). The next (m) lines describe the queries in o

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
355816324 mban259 F2 Dec. 29, 2025, 11:48 p.m. OK C# 10 TESTS 51 2343 50380800
355823840 TrendBattles F2 Dec. 30, 2025, 3:14 a.m. OK C++17 (GCC 7-32) TESTS 51 984 4915200
355877876 CloudDreamLaker F2 Dec. 30, 2025, 1:22 p.m. OK C++17 (GCC 7-32) TESTS 55 1078 7270400
355804681 epikaso F2 Dec. 29, 2025, 7:47 p.m. OK C++17 (GCC 7-32) TESTS 50 1171 19251200
355802157 Earlyamazon F2 Dec. 29, 2025, 7:16 p.m. OK C++17 (GCC 7-32) TESTS 50 1218 9625600
355841439 Movazed F2 Dec. 30, 2025, 7:40 a.m. OK C++17 (GCC 7-32) TESTS 55 1296 28876800
355792729 123bai F2 Dec. 29, 2025, 5:42 p.m. OK C++17 (GCC 7-32) TESTS 49 1390 33689600
355934537 Ste F2 Dec. 31, 2025, 2:14 a.m. OK C++17 (GCC 7-32) TESTS 55 1484 14438400
355853241 silentail F2 Dec. 30, 2025, 9:31 a.m. OK C++17 (GCC 7-32) TESTS 55 1484 14540800
355791549 123bai F2 Dec. 29, 2025, 5:31 p.m. OK C++17 (GCC 7-32) TESTS 49 1703 33689600
355884141 mateuszmj F2 Dec. 30, 2025, 2:16 p.m. OK C++17 (GCC 7-32) TESTS 55 1734 14540800
355805686 magikrap F2 Dec. 29, 2025, 8 p.m. OK C++20 (GCC 13-64) TESTS 50 328 8192000
355891192 Hell_Eclipse F2 Dec. 30, 2025, 3:19 p.m. OK C++20 (GCC 13-64) TESTS 55 343 14643200
355860074 TrendBattles F2 Dec. 30, 2025, 10:37 a.m. OK C++20 (GCC 13-64) TESTS 55 359 4915200
355857949 MOUFLESS F2 Dec. 30, 2025, 10:16 a.m. OK C++20 (GCC 13-64) TESTS 55 375 14540800
355809000 t1e1 F2 Dec. 29, 2025, 8:55 p.m. OK C++20 (GCC 13-64) TESTS 51 390 128307200
355801058 antguz F2 Dec. 29, 2025, 7:04 p.m. OK C++20 (GCC 13-64) TESTS 50 390 156364800
355790371 Rvess F2 Dec. 29, 2025, 5:20 p.m. OK C++20 (GCC 13-64) TESTS 49 406 9728000
355797827 antguz F2 Dec. 29, 2025, 6:29 p.m. OK C++20 (GCC 13-64) TESTS 49 406 156364800
355854796 E49869826 F2 Dec. 30, 2025, 9:46 a.m. OK C++20 (GCC 13-64) TESTS 55 421 9728000
355923448 SnoopyCodes F2 Dec. 30, 2025, 8:47 p.m. OK C++20 (GCC 13-64) TESTS 55 421 10547200
355796385 Kluco F2 Dec. 29, 2025, 6:16 p.m. OK C++23 (GCC 14-64, msys2) TESTS 49 328 3481600
355847354 qwsxza F2 Dec. 30, 2025, 8:35 a.m. OK C++23 (GCC 14-64, msys2) TESTS 55 343 35328000
355827513 A_G F2 Dec. 30, 2025, 4:25 a.m. OK C++23 (GCC 14-64, msys2) TESTS 49 359 102400
355789521 SharkFujin F2 Dec. 29, 2025, 5:14 p.m. OK C++23 (GCC 14-64, msys2) TESTS 49 375 3481600
355943314 Wael_Zaiback F2 Dec. 31, 2025, 5:11 a.m. OK C++23 (GCC 14-64, msys2) TESTS 55 375 10649600
355930455 Dragos F2 Dec. 31, 2025, midnight OK C++23 (GCC 14-64, msys2) TESTS 55 375 12390400
355927856 Vadim1111 F2 Dec. 30, 2025, 10:29 p.m. OK C++23 (GCC 14-64, msys2) TESTS 55 375 15462400
355861702 seltysh. F2 Dec. 30, 2025, 10:52 a.m. OK C++23 (GCC 14-64, msys2) TESTS 55 375 32153600
355861673 seltysh. F2 Dec. 30, 2025, 10:51 a.m. OK C++23 (GCC 14-64, msys2) TESTS 55 375 32153600
355839808 012345 F2 Dec. 30, 2025, 7:24 a.m. OK C++23 (GCC 14-64, msys2) TESTS 51 390 10649600
355840013 __baozii__ F2 Dec. 30, 2025, 7:26 a.m. OK Go TESTS 51 1359 346214400
355921555 golions F2 Dec. 30, 2025, 8:13 p.m. OK Java 8 TESTS 55 3343 530022400
355920666 golions F2 Dec. 30, 2025, 7:59 p.m. OK Java 8 TESTS 55 3421 530124800
355920918 golions F2 Dec. 30, 2025, 8:03 p.m. OK Java 8 TESTS 55 3453 530124800
355920867 golions F2 Dec. 30, 2025, 8:02 p.m. OK Java 8 TESTS 55 3484 530022400
355924708 twosquares F2 Dec. 30, 2025, 9:13 p.m. OK PyPy 3-64 TESTS 55 1156 60108800
355848022 Little_Sheep_Yawn F2 Dec. 30, 2025, 8:41 a.m. OK PyPy 3-64 TESTS 55 1203 50688000
355841713 Emikooh F2 Dec. 30, 2025, 7:42 a.m. OK PyPy 3-64 TESTS 55 1234 110489600
355850616 fatalerror F2 Dec. 30, 2025, 9:05 a.m. OK PyPy 3-64 TESTS 55 1531 53452800
355928447 twosquares F2 Dec. 30, 2025, 10:46 p.m. OK PyPy 3-64 TESTS 55 2109 443187200
355929649 twosquares F2 Dec. 30, 2025, 11:26 p.m. OK PyPy 3-64 TESTS 55 2343 443187200
355924205 twosquares F2 Dec. 30, 2025, 9:03 p.m. OK PyPy 3-64 TESTS 55 2500 445235200
355816774 Alex239 F2 Dec. 30, 2025, midnight OK PyPy 3-64 TESTS 51 2718 77721600
355838259 smilences F2 Dec. 30, 2025, 7:09 a.m. OK PyPy 3-64 TESTS 51 2781 56320000
355843608 fwsafdawd10 F2 Dec. 30, 2025, 8 a.m. OK PyPy 3-64 TESTS 55 2843 120320000

remove filters

Back to search problems