Codeforces Round 885 (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
1848 Codeforces Round 885 (Div. 2) FINISHED False 7200 47661863 July 16, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2679 ) D Vika and Bonuses PROGRAMMING binary search brute force math ternary search

B'A new bonus system has been introduced at Vika 's favorite cosmetics store, "Golden Pear"! The system works as follows: suppose a customer has b bonuses. Before paying for the purchase, the customer can choose one of two options: For example, if a customer had 24 bonuses, he can either get a discount of 24 or accumulate an additional 4 bonuses, after which his account will have 28 bonuses. At the moment, Vika has already accumulated s bonuses. The girl knows that during the remaining time of the bonus system, she will make k more purchases at the "Golden Pear" store network. After familiarizing herself with the rules of the bonus system, Vika became interested in the maximum total discount she can get. Help the girl answer this question. Each test consists of multiple test cases. The first line contains a single integer t ( 1 <= t <= 10^5 ) -- the number of test cases. The description of the test cases follows. The test case consists of a single line containing two integers s and k ( 0 <= s <= 10^9 , 1 <= k <= 10^9 ) -- the current number of bonuses in Vika 's account and how many more purchases the girl will make. For each test case, output a single integer -- the maximum total discount that can be obtained through the bonus system. In the first test case, Vika can accumulate bonuses after the first and second purchases, after which she can get a discount of 4 . In the second test case, Vika can get a discount of 11 three times, and the total discount will be 33 . In the third example, regardless of Vika 's actions, she will always get a total discount of 0 . '...

Tutorials

Codeforces Round #885 (Div.2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
214100794 Tdyx D July 16, 2023, 5:15 p.m. OK C# 10 TESTS 22 187 20787200
214095695 kakel_san D July 16, 2023, 4:34 p.m. OK C# 8 TESTS 22 233 11878400
214105393 swayingdream D July 16, 2023, 5:58 p.m. OK GNU C11 TESTS 22 421 0
214098569 pengin_2000 D July 16, 2023, 5:01 p.m. OK GNU C11 TESTS 22 655 0
214094901 yukai D July 16, 2023, 4:33 p.m. OK GNU C++14 TESTS 22 109 0
214102785 Iceberg D July 16, 2023, 5:32 p.m. OK GNU C++14 TESTS 22 124 0
214089593 skytyf D July 16, 2023, 4:20 p.m. OK GNU C++14 TESTS 22 124 0
214086602 KXG D July 16, 2023, 4:11 p.m. OK GNU C++14 TESTS 22 124 0
214137919 NOI_rk233 D July 17, 2023, 2:06 a.m. OK GNU C++14 TESTS 22 124 0
214137151 llloserqz D July 17, 2023, 1:57 a.m. OK GNU C++14 TESTS 22 124 0
214136341 Leo_W D July 17, 2023, 1:46 a.m. OK GNU C++14 TESTS 22 124 0
214136077 KurashinaAsuka D July 17, 2023, 1:42 a.m. OK GNU C++14 TESTS 22 124 0
214136028 Leo_W D July 17, 2023, 1:41 a.m. OK GNU C++14 TESTS 22 124 0
214085123 sigmoid114 D July 16, 2023, 4:06 p.m. OK GNU C++14 TESTS 22 139 0
214149706 Morphymorphymorphy D July 17, 2023, 4:28 a.m. OK GNU C++17 TESTS 22 109 0
214150749 SANYASI_RAJA D July 17, 2023, 4:45 a.m. OK GNU C++17 TESTS 22 124 0
214093712 arimxcoder D July 16, 2023, 4:30 p.m. OK GNU C++17 TESTS 22 139 0
214106875 lxyb D July 16, 2023, 6:14 p.m. OK GNU C++17 TESTS 22 139 0
214119233 anh_khong_an_mung D July 16, 2023, 8:23 p.m. OK GNU C++17 TESTS 22 139 0
214131486 -kirito- D July 17, 2023, 12:21 a.m. OK GNU C++17 TESTS 22 140 0
214110561 Atekichan D July 16, 2023, 6:55 p.m. OK GNU C++17 TESTS 22 140 0
214106904 lxyb D July 16, 2023, 6:15 p.m. OK GNU C++17 TESTS 22 140 0
214145551 Nekoyo D July 17, 2023, 3:31 a.m. OK GNU C++17 TESTS 22 140 0
214143672 1533050560 D July 17, 2023, 3:11 a.m. OK GNU C++17 TESTS 22 140 0
214110489 stan23456 D July 16, 2023, 6:54 p.m. OK GNU C++17 (64) TESTS 22 77 0
214152716 lincid D July 17, 2023, 5:15 a.m. OK GNU C++17 (64) TESTS 22 77 0
214141403 Ailok D July 17, 2023, 2:46 a.m. OK GNU C++17 (64) TESTS 22 77 0
214098676 GILGAMESH D July 16, 2023, 5:01 p.m. OK GNU C++17 (64) TESTS 22 92 0
214110402 stan23456 D July 16, 2023, 6:53 p.m. OK GNU C++17 (64) TESTS 22 93 0
214110294 stan23456 D July 16, 2023, 6:51 p.m. OK GNU C++17 (64) TESTS 22 93 0
214109275 lunchbox D July 16, 2023, 6:39 p.m. OK GNU C++17 (64) TESTS 22 93 0
214099071 TheLostCookie D July 16, 2023, 5:04 p.m. OK GNU C++17 (64) TESTS 22 93 0
214139241 secret-550504 D July 17, 2023, 2:21 a.m. OK GNU C++17 (64) TESTS 22 93 0
214126045 enslaved D July 16, 2023, 10:14 p.m. OK GNU C++17 (64) TESTS 22 93 0
214106953 YahiaSherif D July 16, 2023, 6:15 p.m. OK GNU C++20 (64) TESTS 22 46 0
214098991 Sheep_Li D July 16, 2023, 5:03 p.m. OK GNU C++20 (64) TESTS 22 46 0
214107006 YahiaSherif D July 16, 2023, 6:15 p.m. OK GNU C++20 (64) TESTS 22 61 0
214149050 yingluosanqian D July 17, 2023, 4:16 a.m. OK GNU C++20 (64) TESTS 22 61 0
214137192 cosenza D July 17, 2023, 1:57 a.m. OK GNU C++20 (64) TESTS 22 61 0
214133656 DesperadoX D July 17, 2023, 1:05 a.m. OK GNU C++20 (64) TESTS 22 61 0
214123489 POTUS D July 16, 2023, 9:24 p.m. OK GNU C++20 (64) TESTS 22 61 0
214106215 lvsc__ D July 16, 2023, 6:07 p.m. OK GNU C++20 (64) TESTS 22 61 0
214103846 Anemone_ D July 16, 2023, 5:42 p.m. OK GNU C++20 (64) TESTS 22 61 0
214097529 coconut99 D July 16, 2023, 4:57 p.m. OK GNU C++20 (64) TESTS 22 61 0
214108801 dzhi D July 16, 2023, 6:33 p.m. OK Java 11 TESTS 22 295 0
214088982 profchi D July 16, 2023, 4:18 p.m. OK Java 11 TESTS 22 919 0
214145860 butteronpoptart D July 17, 2023, 3:35 a.m. OK Java 11 TESTS 22 1076 0
214089922 mink0389 D July 16, 2023, 4:21 p.m. OK Java 11 TESTS 22 1372 0
214138772 wizardleen D July 17, 2023, 2:16 a.m. OK Java 17 TESTS 22 452 10752000
214138649 wizardleen D July 17, 2023, 2:15 a.m. OK Java 17 TESTS 22 467 10854400
214102715 vaibhav_1710 D July 16, 2023, 5:31 p.m. OK Java 17 TESTS 22 638 614400
214093967 synasc D July 16, 2023, 4:31 p.m. OK Java 17 TESTS 22 701 512000
214112305 jack.t.y.wu D July 16, 2023, 7:14 p.m. OK Java 17 TESTS 22 764 614400
214115657 lpychemistry D July 16, 2023, 7:53 p.m. OK Java 8 TESTS 22 202 0
214086580 yvbf D July 16, 2023, 4:11 p.m. OK Java 8 TESTS 22 202 0
214134074 cc4414 D July 17, 2023, 1:11 a.m. OK Java 8 TESTS 22 499 0
214085570 suisdavid D July 16, 2023, 4:08 p.m. OK MS C++ 2017 TESTS 22 686 0
214097585 sluki D July 16, 2023, 4:57 p.m. OK MS C++ 2017 TESTS 22 826 0
214093611 PiscesDream D July 16, 2023, 4:30 p.m. OK PyPy 3 TESTS 22 2807 11776000
214108759 Alex239 D July 16, 2023, 6:33 p.m. OK PyPy 3-64 TESTS 22 296 12288000
214092055 VitaLemonTea D July 16, 2023, 4:26 p.m. OK PyPy 3-64 TESTS 22 311 12083200
214098260 misorin D July 16, 2023, 4:59 p.m. OK PyPy 3-64 TESTS 22 311 14745600
214123201 RobinFromTheHood D July 16, 2023, 9:19 p.m. OK PyPy 3-64 TESTS 22 327 11980800
214106596 flygon D July 16, 2023, 6:11 p.m. OK PyPy 3-64 TESTS 22 389 12083200
214087451 hulahula32471 D July 16, 2023, 4:13 p.m. OK PyPy 3-64 TESTS 22 498 11468800
214094855 Leeisateam D July 16, 2023, 4:33 p.m. OK PyPy 3-64 TESTS 22 639 12390400
214086724 huikang D July 16, 2023, 4:11 p.m. OK PyPy 3-64 TESTS 22 919 12902400
214127596 pglutz D July 16, 2023, 10:46 p.m. OK PyPy 3-64 TESTS 22 1247 12083200
214112230 Frus D July 16, 2023, 7:14 p.m. OK PyPy 3-64 TESTS 22 1325 23654400
214101002 Kladrr D July 16, 2023, 5:17 p.m. OK Python 3 TESTS 22 795 307200
214153528 Alexrider726 D July 17, 2023, 5:27 a.m. OK Python 3 TESTS 22 1341 0
214154382 Hritik12 D July 17, 2023, 5:39 a.m. OK Python 3 TESTS 22 1356 0
214099926 haihamabossu D July 16, 2023, 5:09 p.m. OK Rust 2021 TESTS 22 78 0
214087235 kost D July 16, 2023, 4:13 p.m. OK Rust 2021 TESTS 22 109 0
214094981 robostac D July 16, 2023, 4:33 p.m. OK Rust 2021 TESTS 22 234 0
214094957 andrey.m D July 16, 2023, 4:33 p.m. OK Rust 2021 TESTS 22 1169 0

remove filters

Back to search problems