Codeforces Round 953 (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
1978 Codeforces Round 953 (Div. 2) FINISHED False 7200 18651263 June 16, 2024, 9:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 22935 ) B New Bakery PROGRAMMING binary search greedy math ternary search

B'Bob decided to open a bakery. On the opening day, he baked n buns that he can sell. The usual price of a bun is a coins, but to attract customers, Bob organized the following promotion: Note that k can be equal to 0 . In this case, Bob will sell all the buns at a coins each. Help Bob determine the maximum profit he can obtain by selling all n buns. Each test consists of multiple test cases. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The description of the test cases follows. The only line of each test case contains three integers n , a , and b ( 1 <= n, a, b <= 10^9 ) -- the number of buns, the usual price of a bun, and the price of the first bun to be sold at a modified price. For each test case, output a single integer -- the maximum profit that Bob can obtain. In the first test case, it is optimal for Bob to choose k = 1 . Then he will sell one bun for 5 coins, and three buns at the usual price for 4 coins each. Then the profit will be 5 + 4 + 4 + 4 = 17 coins. In the second test case, it is optimal for Bob to choose k = 5 . Then he will sell all the buns at the modified price and obtain a profit of 9 + 8 + 7 + 6 + 5 = 35 coins. In the third test case, it is optimal for Bob to choose k = 0 . Then he will sell all the buns at the usual price and obtain a profit of 10 cdot 10 = 100 coins. '...

Tutorials

130527

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
266101907 dark_horse_029 B June 16, 2024, 6:23 p.m. OK C++14 (GCC 6-32) TESTS 4 46 0
266137713 caiyuanqi B June 17, 2024, 5:39 a.m. OK C++14 (GCC 6-32) TESTS 4 46 0
266130039 Xujj B June 17, 2024, 3:47 a.m. OK C++14 (GCC 6-32) TESTS 4 46 0
266129995 jKJk111 B June 17, 2024, 3:47 a.m. OK C++14 (GCC 6-32) TESTS 4 46 0
266129178 falsely B June 17, 2024, 3:35 a.m. OK C++14 (GCC 6-32) TESTS 4 46 0
266129138 ZifanWang B June 17, 2024, 3:35 a.m. OK C++14 (GCC 6-32) TESTS 4 46 0
266126744 anmattroi B June 17, 2024, 2:57 a.m. OK C++14 (GCC 6-32) TESTS 4 46 0
266119511 Grammar_hbw B June 17, 2024, 12:09 a.m. OK C++14 (GCC 6-32) TESTS 4 46 0
266117941 Day_Tao B June 16, 2024, 11:21 p.m. OK C++14 (GCC 6-32) TESTS 4 46 0
266116401 int_R B June 16, 2024, 10:32 p.m. OK C++14 (GCC 6-32) TESTS 4 46 0
266139622 Elysian_jianyu B June 17, 2024, 6:02 a.m. OK C++17 (GCC 7-32) TESTS 4 31 0
266066087 SHIFO. B June 16, 2024, 1:26 p.m. OK C++17 (GCC 7-32) TESTS 4 31 0
266136553 zcq301 B June 17, 2024, 5:25 a.m. OK C++17 (GCC 7-32) TESTS 4 46 0
266139647 tapbucode B June 17, 2024, 6:02 a.m. OK C++17 (GCC 7-32) TESTS 4 46 0
266138248 aj_0070261 B June 17, 2024, 5:46 a.m. OK C++17 (GCC 7-32) TESTS 4 46 0
266136809 Anurag_Negi B June 17, 2024, 5:28 a.m. OK C++17 (GCC 7-32) TESTS 4 46 0
266136614 again_rohit B June 17, 2024, 5:25 a.m. OK C++17 (GCC 7-32) TESTS 4 46 0
266136562 Cu_OH_2 B June 17, 2024, 5:25 a.m. OK C++17 (GCC 7-32) TESTS 4 46 0
266136560 pranav_2301 B June 17, 2024, 5:25 a.m. OK C++17 (GCC 7-32) TESTS 4 46 0
266136132 shi_vam211 B June 17, 2024, 5:19 a.m. OK C++17 (GCC 7-32) TESTS 4 46 0
266093432 greentree888 B June 16, 2024, 5:02 p.m. OK C++20 (GCC 13-64) TESTS 4 31 0
266135326 beko4real B June 17, 2024, 5:08 a.m. OK C++20 (GCC 13-64) TESTS 4 31 0
266132022 kushnatani B June 17, 2024, 4:20 a.m. OK C++20 (GCC 13-64) TESTS 4 31 0
266113580 Equilibrium_1377 B June 16, 2024, 9:20 p.m. OK C++20 (GCC 13-64) TESTS 4 31 0
266086812 u_shekar_kodangal B June 16, 2024, 4:05 p.m. OK C++20 (GCC 13-64) TESTS 4 31 0
266068255 dhuyyyy B June 16, 2024, 1:44 p.m. OK C++20 (GCC 13-64) TESTS 4 31 0
266066075 _Hyphen B June 16, 2024, 1:26 p.m. OK C++20 (GCC 13-64) TESTS 4 31 0
266138651 CHROMIUM00 B June 17, 2024, 5:50 a.m. OK C++20 (GCC 13-64) TESTS 4 31 102400
266120460 yangster67 B June 17, 2024, 12:38 a.m. OK C++20 (GCC 13-64) TESTS 4 31 102400
266139580 yanke B June 17, 2024, 6:01 a.m. OK C++20 (GCC 13-64) TESTS 4 46 0
266115398 bluemegane B June 16, 2024, 10:03 p.m. OK C# 8 TESTS 4 108 2969600
266078633 NenadDapic B June 16, 2024, 3:02 p.m. OK FPC TESTS 4 61 0
266074638 aza161 B June 16, 2024, 2:30 p.m. OK GNU C11 TESTS 4 62 102400
266111329 Joey028 B June 16, 2024, 8:34 p.m. OK GNU C11 TESTS 4 77 102400
266082221 kaen_ B June 16, 2024, 3:28 p.m. OK GNU C11 TESTS 4 77 102400
266133028 Claudemirovsky B June 17, 2024, 4:35 a.m. OK GNU C11 TESTS 4 92 0
266104336 sparshsinha11 B June 16, 2024, 6:51 p.m. OK GNU C11 TESTS 4 92 102400
266076112 june013 B June 16, 2024, 2:42 p.m. OK GNU C11 TESTS 4 93 0
266104581 Ayush_Negi B June 16, 2024, 6:54 p.m. OK GNU C11 TESTS 4 93 102400
266099798 Nakshatra07 B June 16, 2024, 6:02 p.m. OK GNU C11 TESTS 4 93 102400
266072774 atharvatol04 B June 16, 2024, 2:13 p.m. OK GNU C11 TESTS 4 93 102400
266075240 aza161 B June 16, 2024, 2:35 p.m. OK GNU C11 TESTS 4 108 102400
266124618 tom_pan1901 B June 17, 2024, 2:18 a.m. OK Go TESTS 4 62 819200
266108583 prajjwalit B June 16, 2024, 7:48 p.m. OK Go TESTS 4 281 1331200
266075732 Kalentsov_Maxim_8m B June 16, 2024, 2:39 p.m. OK Haskell TESTS 4 140 0
266112802 lpychemistry B June 16, 2024, 9:04 p.m. OK Java 21 TESTS 4 187 614400
266113489 powervic08 B June 16, 2024, 9:18 p.m. OK Java 21 TESTS 4 202 307200
266104917 _Abhinavv_ B June 16, 2024, 6:58 p.m. OK Java 21 TESTS 4 218 0
266111276 Mega6776 B June 16, 2024, 8:33 p.m. OK Java 21 TESTS 4 218 307200
266138854 ankush9140 B June 17, 2024, 5:53 a.m. OK Java 21 TESTS 4 218 614400
266101087 madhanirahul92 B June 16, 2024, 6:15 p.m. OK Java 21 TESTS 4 218 614400
266139372 lililIlililIllliiiiL B June 17, 2024, 5:59 a.m. OK Java 21 TESTS 4 233 204800
266093336 coder0687 B June 16, 2024, 5:01 p.m. OK Java 21 TESTS 4 233 204800
266088773 nithin_bharathi B June 16, 2024, 4:21 p.m. OK Java 21 TESTS 4 233 204800
266074069 maurya.rahul682 B June 16, 2024, 2:25 p.m. OK Java 21 TESTS 4 264 921600
266116172 samuelX159 B June 16, 2024, 10:25 p.m. OK Java 8 TESTS 4 124 0
266093195 NerfThis B June 16, 2024, 4:59 p.m. OK Java 8 TESTS 4 155 0
266097028 gomudayya B June 16, 2024, 5:35 p.m. OK Java 8 TESTS 4 171 0
266133817 coderman2004 B June 17, 2024, 4:47 a.m. OK Java 8 TESTS 4 202 0
266090017 jaideep151097 B June 16, 2024, 4:31 p.m. OK Java 8 TESTS 4 202 0
266077429 Sumitsingh7 B June 16, 2024, 2:53 p.m. OK Java 8 TESTS 4 202 7065600
266067545 PravinGlitch_12 B June 16, 2024, 1:38 p.m. OK Java 8 TESTS 4 218 0
266126316 bully_maguire B June 17, 2024, 2:50 a.m. OK Java 8 TESTS 4 233 0
266084829 ankeshgupta B June 16, 2024, 3:49 p.m. OK Java 8 TESTS 4 233 0
266138315 prash28 B June 17, 2024, 5:46 a.m. OK Java 8 TESTS 4 249 0
266115135 hussein777 B June 16, 2024, 9:57 p.m. OK Kotlin 1.7 TESTS 4 436 18329600
266065371 L-S-S B June 16, 2024, 1:20 p.m. OK Kotlin 1.7 TESTS 4 437 17612800
266090412 bio-duplex B June 16, 2024, 4:35 p.m. OK Kotlin 1.9 TESTS 4 218 102400
266084081 SHIVANG12 B June 16, 2024, 3:43 p.m. OK PyPy 3 TESTS 4 280 6963200
266137528 Rakeshyamjala B June 17, 2024, 5:37 a.m. OK PyPy 3 TESTS 4 296 7475200
266114125 nealzane B June 16, 2024, 9:32 p.m. OK PyPy 3 TESTS 4 296 8294400
266065281 taliansky B June 16, 2024, 1:19 p.m. OK PyPy 3 TESTS 4 296 8294400
266063990 pyl_youngboy B June 16, 2024, 1:09 p.m. OK PyPy 3 TESTS 4 296 9728000
266091618 gardengnome B June 16, 2024, 4:45 p.m. OK PyPy 3-64 TESTS 4 93 3788800
266103178 jhileman B June 16, 2024, 6:37 p.m. OK PyPy 3-64 TESTS 4 93 4608000
266068842 AyuAnchor B June 16, 2024, 1:49 p.m. OK PyPy 3-64 TESTS 4 108 3584000
266123476 Newbie_ B June 17, 2024, 1:53 a.m. OK PyPy 3-64 TESTS 4 108 4403200
266103584 Ysb04 B June 16, 2024, 6:42 p.m. OK PyPy 3-64 TESTS 4 108 4505600
266081931 burnerboy13 B June 16, 2024, 3:26 p.m. OK PyPy 3-64 TESTS 4 108 135884800
266097943 zhengyi20thu B June 16, 2024, 5:44 p.m. OK PyPy 3-64 TESTS 4 109 4403200
266068961 RobinFromTheHood B June 16, 2024, 1:50 p.m. OK PyPy 3-64 TESTS 4 109 4403200
266109973 NitroSpear B June 16, 2024, 8:10 p.m. OK PyPy 3-64 TESTS 4 109 4505600
266106332 singh.eureka B June 16, 2024, 7:16 p.m. OK PyPy 3-64 TESTS 4 109 4710400
266119100 Sarvesh810 B June 16, 2024, 11:56 p.m. OK Python 3 TESTS 4 93 0
266106886 manoharsingh2402 B June 16, 2024, 7:24 p.m. OK Python 3 TESTS 4 93 0
266102641 dhawal_23 B June 16, 2024, 6:31 p.m. OK Python 3 TESTS 4 93 0
266122963 ehabnasr406 B June 17, 2024, 1:43 a.m. OK Python 3 TESTS 4 108 0
266104914 rishav447 B June 16, 2024, 6:58 p.m. OK Python 3 TESTS 4 108 0
266099387 mahi0523 B June 16, 2024, 5:59 p.m. OK Python 3 TESTS 4 108 0
266095567 altruistic99 B June 16, 2024, 5:22 p.m. OK Python 3 TESTS 4 108 0
266093534 Dvs_sudheer_reddy B June 16, 2024, 5:03 p.m. OK Python 3 TESTS 4 108 0
266088176 deepak19 B June 16, 2024, 4:16 p.m. OK Python 3 TESTS 4 108 0
266069034 shangzhexin B June 16, 2024, 1:51 p.m. OK Python 3 TESTS 4 108 0
266100816 0x81 B June 16, 2024, 6:12 p.m. OK Ruby 3 TESTS 4 311 1433600
266116316 M1ngXu B June 16, 2024, 10:29 p.m. OK Rust 2021 TESTS 4 46 0
266097160 Tomoya_11 B June 16, 2024, 5:36 p.m. OK Rust 2021 TESTS 4 62 0

remove filters

Back to search problems