Educational Codeforces Round 182 (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
2144 Educational Codeforces Round 182 (Rated for Div. 2) FINISHED False 7200 18458723 Sept. 15, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 6957 ) D Price Tags PROGRAMMING dp math

Imagine that you are the owner of a store. Before the start of a new season, you decided to clear your store of leftover goods, and therefore you decided to hold a total sale. You have (n) different items in your store: the (i)-th item costs (c_i) coins. Each item has a price tag with the corresponding price (c_i). You decided to hold a sale in the format: "we divided all the prices (x) times." Formally, this means that you choose a common coefficient (x), and during the sale, the (i)-th item will cost (\left\lceil \frac{c_i}{x} \right\rceil) coins (where (\left\lceil y \right\rceil) denotes rounding up). To avoid confusion among the customers, you need to pin new price tags with new prices on all items, but printing new price tags is costly. Specifically, each printed price tag will cost you (y) coins. Therefore, you had a brilliant idea — why not use the existing price tags and simply repin them on other items? So, you'll need to print price tags only for those items that do not have a corresponding price tag available. There remains one last question: by how much should you reduce the prices, or what (x) should you choose? The coefficient (x) must be an integer strictly greater than (1) and such that the total income is maximized. The total income is equal to the total value of the items minus the cost of the printed price tags. Determine the maximum possible total income. The first line contains a single integer (t) ((1 \le t \le 10)) — the number of test cases. The first line of each test case contains two integers (n) and (y) ((1 \le n \le 2 \cdot 10^5); (1 \le y \le 10^9)) — the number of items and the cost of printing one price tag. The second line contains (n) integers (c_1, c_2, \dots, c_n) ((1 \le c_i \le 2 \cdot 10^5)) — the initial prices of the items. For each test case, output a single integer — the maximum total income. In the first test case, it is opti

Tutorials

Educational Codeforces Round 182 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
338876715 og.kostya D Sept. 16, 2025, 7:34 a.m. OK C# 10 TESTS 13 296 39321600
338876623 og.kostya D Sept. 16, 2025, 7:33 a.m. OK C# 13 TESTS 13 515 34611200
338999615 TheRZ D Sept. 16, 2025, 8:13 p.m. OK C++17 (GCC 7-32) TESTS 13 514 819200
339004706 JakobZ D Sept. 16, 2025, 9:57 p.m. OK C++17 (GCC 7-32) TESTS 13 515 0
338993676 lk2147 D Sept. 16, 2025, 7:07 p.m. OK C++17 (GCC 7-32) TESTS 13 530 1638400
338882621 -adhd- D Sept. 16, 2025, 8:22 a.m. OK C++17 (GCC 7-32) TESTS 13 531 0
339018184 chillingguy D Sept. 17, 2025, 3:13 a.m. OK C++17 (GCC 7-32) TESTS 13 531 1638400
338880336 viobow D Sept. 16, 2025, 8:08 a.m. OK C++17 (GCC 7-32) TESTS 13 531 2457600
339021346 Divyansh1128 D Sept. 17, 2025, 3:53 a.m. OK C++17 (GCC 7-32) TESTS 13 546 0
338826811 ankithello20 D Sept. 15, 2025, 6:19 p.m. OK C++17 (GCC 7-32) TESTS 13 546 0
338935581 MrBarHat D Sept. 16, 2025, 2:22 p.m. OK C++17 (GCC 7-32) TESTS 13 546 2457600
339011926 magic_fox D Sept. 17, 2025, 1:35 a.m. OK C++17 (GCC 7-32) TESTS 13 561 0
338888620 ACE0172 D Sept. 16, 2025, 8:58 a.m. OK C++20 (GCC 13-64) TESTS 13 171 6860800
338894890 piantouqu D Sept. 16, 2025, 9:44 a.m. OK C++20 (GCC 13-64) TESTS 13 186 5017600
338876765 www_bilibili_com D Sept. 16, 2025, 7:34 a.m. OK C++20 (GCC 13-64) TESTS 13 296 5734400
338881511 nbwnd2010 D Sept. 16, 2025, 8:15 a.m. OK C++20 (GCC 13-64) TESTS 13 296 7065600
338856094 xlone D Sept. 16, 2025, 3:05 a.m. OK C++20 (GCC 13-64) TESTS 13 374 0
338877628 ryuuko_ D Sept. 16, 2025, 7:42 a.m. OK C++20 (GCC 13-64) TESTS 13 374 102400
338876128 XVETV8 D Sept. 16, 2025, 7:28 a.m. OK C++20 (GCC 13-64) TESTS 13 374 819200
338898217 _Kee D Sept. 16, 2025, 10:13 a.m. OK C++20 (GCC 13-64) TESTS 13 374 1843200
338857035 convie D Sept. 16, 2025, 3:23 a.m. OK C++20 (GCC 13-64) TESTS 13 374 91340800
338902163 yanghongyan D Sept. 16, 2025, 10:50 a.m. OK C++20 (GCC 13-64) TESTS 13 375 0
338897037 424479543 D Sept. 16, 2025, 10:02 a.m. OK C++23 (GCC 14-64, msys2) TESTS 13 140 921600
338896220 424479543 D Sept. 16, 2025, 9:55 a.m. OK C++23 (GCC 14-64, msys2) TESTS 13 155 921600
338894027 424479543 D Sept. 16, 2025, 9:37 a.m. OK C++23 (GCC 14-64, msys2) TESTS 13 155 1740800
338894201 424479543 D Sept. 16, 2025, 9:38 a.m. OK C++23 (GCC 14-64, msys2) TESTS 13 156 921600
338855335 47523 D Sept. 16, 2025, 2:53 a.m. OK C++23 (GCC 14-64, msys2) TESTS 13 156 921600
338897374 424479543 D Sept. 16, 2025, 10:05 a.m. OK C++23 (GCC 14-64, msys2) TESTS 13 171 921600
338817427 zjjws D Sept. 15, 2025, 5:02 p.m. OK C++23 (GCC 14-64, msys2) TESTS 13 171 2560000
338885851 q1uple D Sept. 16, 2025, 8:41 a.m. OK C++23 (GCC 14-64, msys2) TESTS 13 202 5017600
338879150 Kaedemaple D Sept. 16, 2025, 7:57 a.m. OK C++23 (GCC 14-64, msys2) TESTS 13 358 7475200
338947471 Primal_Potato D Sept. 16, 2025, 3:39 p.m. OK C++23 (GCC 14-64, msys2) TESTS 13 359 0
338893611 0x3F D Sept. 16, 2025, 9:34 a.m. OK Go TESTS 13 202 4198400
338894347 0x3F D Sept. 16, 2025, 9:39 a.m. OK Go TESTS 13 218 4300800
338891592 0x3F D Sept. 16, 2025, 9:20 a.m. OK Go TESTS 13 937 10035200
338891366 0x3F D Sept. 16, 2025, 9:18 a.m. OK Go TESTS 13 984 10035200
338840664 luciferstern D Sept. 15, 2025, 9:18 p.m. OK Java 21 TESTS 13 484 1331200
338994112 iamalizaidi D Sept. 16, 2025, 7:11 p.m. OK Java 21 TESTS 13 499 1536000
338840571 luciferstern D Sept. 15, 2025, 9:16 p.m. OK Java 21 TESTS 13 499 2150400
338830166 vedant_shukla D Sept. 15, 2025, 6:52 p.m. OK Java 21 TESTS 13 546 2457600
338816617 ccj123 D Sept. 15, 2025, 4:56 p.m. OK Java 21 TESTS 13 671 921600
338848764 duyipeng D Sept. 16, 2025, 12:41 a.m. OK Java 21 TESTS 13 889 2662400
338920011 mortal... D Sept. 16, 2025, 12:46 p.m. OK Java 21 TESTS 13 905 921600
338906920 vatsal_04 D Sept. 16, 2025, 11:27 a.m. OK Java 21 TESTS 13 921 6451200
338898059 sulabhambule D Sept. 16, 2025, 10:12 a.m. OK Java 21 TESTS 13 999 2457600
338853980 punitpunde D Sept. 16, 2025, 2:29 a.m. OK Java 21 TESTS 13 999 5836800
338848930 xmjlove D Sept. 16, 2025, 12:45 a.m. OK Java 8 TESTS 13 781 0
338892652 tirthgohil1410 D Sept. 16, 2025, 9:27 a.m. OK Java 8 TESTS 13 952 6451200
338919313 sioe9 D Sept. 16, 2025, 12:41 p.m. OK Kotlin 2.2 TESTS 13 1734 21504000
338985417 diss_quack D Sept. 16, 2025, 5:51 p.m. OK PyPy 3-64 TESTS 13 749 27750400
338821200 DT4V D Sept. 15, 2025, 5:30 p.m. OK PyPy 3-64 TESTS 13 765 41164800
338916710 gyoseon123 D Sept. 16, 2025, 12:23 p.m. OK PyPy 3-64 TESTS 13 796 53248000
338992029 golomb D Sept. 16, 2025, 6:51 p.m. OK PyPy 3-64 TESTS 13 796 56012800
338849437 smilences D Sept. 16, 2025, 12:57 a.m. OK PyPy 3-64 TESTS 13 812 33587200
338831016 siuhou D Sept. 15, 2025, 7:01 p.m. OK PyPy 3-64 TESTS 13 812 58982400
338818204 DT4V D Sept. 15, 2025, 5:08 p.m. OK PyPy 3-64 TESTS 13 827 47104000
338893197 LightHouse1 D Sept. 16, 2025, 9:31 a.m. OK PyPy 3-64 TESTS 13 828 61030400
339024318 YF_YUSUF D Sept. 17, 2025, 4:41 a.m. OK PyPy 3-64 TESTS 13 859 60518400
338837632 hugoback01 D Sept. 15, 2025, 8:25 p.m. OK PyPy 3-64 TESTS 13 859 61030400
339006534 NagisaF D Sept. 16, 2025, 10:53 p.m. OK Rust 2021 TESTS 13 186 2969600
339023322 Svlad_Cjelli D Sept. 17, 2025, 4:22 a.m. OK Rust 2021 TESTS 13 765 7577600

remove filters

Back to search problems