Codeforces Round 880 (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
1836 Codeforces Round 880 (Div. 2) FINISHED False 7200 44724299 June 18, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 12709 ) B Astrophysicists PROGRAMMING greedy math

B'In many, many years, far, far away, there will be a launch of the first flight to Mars. To celebrate the success, n astrophysicists working on the project will be given bonuses of a total value of k gold coins. You have to distribute the money among the astrophysicists, and to make it easier, you have to assign bonuses in silver coins. Each gold coin is worth g silver coins, so you have to distribute all k cdot g silver coins among n people. Unfortunately, the company has some financial troubles right now. Therefore, instead of paying the number of silver coins written on the bonus, they decided to round this amount to the nearest integer number of gold coins. The rounding procedure is as follows. If an astrophysicist has bonus equal to x silver coins, and we denote r = x bmod g , then: You aim to distribute the bonuses so that the company saves as many silver coins due to rounding as possible. Please note that there is always a distribution in which the company spends no more than k cdot g silver coins. In the first line of input, there is one integer t ( 1 <= q t <= q 10^4 ) denoting the number of test cases. Each of the following t lines describes one test case and contains three integers n , k , g ( 1 <= n <= 10^9 , 0 <= k <= 10^9 , 2 <= g <= 10^9 ) -- respectively the number of astrophysicists in the company, total number of gold coins to assign and the number of silver coins that one gold coin corresponds to. In a separate line for each test case, output a single integer -- the maximum number of silver coins that could be saved due to rounding. In the first test case, one of the optimal assignments could be the following: In the second test case, we could have the following assignment: If the bonuses are assigned to 7 silver coins for both astrophysicists, then the company would have to pay an additional gold coin to cover the bonuses. '...

Tutorials

Codeforces Round 880 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
210163361 FatalityNT B June 18, 2023, 4:30 p.m. OK C# 10 TESTS 8 124 2969600
210155157 ravinem1 B June 18, 2023, 4:07 p.m. OK C# 8 TESTS 8 93 3174400
210182657 prattay56 B June 18, 2023, 8:16 p.m. OK GNU C11 TESTS 8 62 0
210151380 maruf_bro B June 18, 2023, 3:56 p.m. OK GNU C11 TESTS 8 62 0
210167296 akmeena22 B June 18, 2023, 5:07 p.m. OK GNU C11 TESTS 8 62 0
210156011 saisreeja0509 B June 18, 2023, 4:10 p.m. OK GNU C11 TESTS 8 77 0
210165217 lachevskykira B June 18, 2023, 4:34 p.m. OK GNU C11 TESTS 8 78 0
210161352 raduv B June 18, 2023, 4:25 p.m. OK GNU C11 TESTS 8 78 0
210157314 MohdFaisal B June 18, 2023, 4:13 p.m. OK GNU C11 TESTS 8 78 0
210148845 Shivu_7 B June 18, 2023, 3:49 p.m. OK GNU C11 TESTS 8 78 0
210155369 Likhon5 B June 18, 2023, 4:08 p.m. OK GNU C++14 TESTS 8 15 0
210153711 3Nic33K B June 18, 2023, 4:03 p.m. OK GNU C++14 TESTS 8 15 0
210183791 cschill B June 18, 2023, 8:37 p.m. OK GNU C++14 TESTS 8 15 0
210167841 NobodyThere B June 18, 2023, 5:09 p.m. OK GNU C++14 TESTS 8 15 0
210162091 AanyaMittal B June 18, 2023, 4:27 p.m. OK GNU C++14 TESTS 8 15 0
210158896 Vaishnavi_Pandey B June 18, 2023, 4:18 p.m. OK GNU C++14 TESTS 8 15 0
210155669 caubebinhthuong B June 18, 2023, 4:09 p.m. OK GNU C++14 TESTS 8 15 0
210198771 xuweihao1000 B June 19, 2023, 3:45 a.m. OK GNU C++14 TESTS 8 15 0
210196861 awolfloveapple B June 19, 2023, 3:05 a.m. OK GNU C++14 TESTS 8 15 0
210195385 PranksterComet B June 19, 2023, 2:30 a.m. OK GNU C++14 TESTS 8 15 0
210197922 Prajwalrayal B June 19, 2023, 3:27 a.m. OK GNU C++17 TESTS 8 15 0
210197240 yyytf__ B June 19, 2023, 3:12 a.m. OK GNU C++17 TESTS 8 15 0
210204999 Sayan_Jasu B June 19, 2023, 5:40 a.m. OK GNU C++17 TESTS 8 15 0
210199948 srijay B June 19, 2023, 4:03 a.m. OK GNU C++17 TESTS 8 15 0
210201383 Arpenteur B June 19, 2023, 4:33 a.m. OK GNU C++17 TESTS 8 15 0
210201463 silent_decoder B June 19, 2023, 4:34 a.m. OK GNU C++17 TESTS 8 15 0
210203475 kar2003 B June 19, 2023, 5:14 a.m. OK GNU C++17 TESTS 8 15 0
210199944 flytime B June 19, 2023, 4:03 a.m. OK GNU C++17 TESTS 8 15 0
210199697 farhana_rahman B June 19, 2023, 3:58 a.m. OK GNU C++17 TESTS 8 15 0
210198766 Danyaaaaaaaa1 B June 19, 2023, 3:45 a.m. OK GNU C++17 TESTS 8 15 0
210175990 MohmadZaid._. B June 18, 2023, 6:27 p.m. OK GNU C++17 (64) TESTS 8 15 0
210172008 Alfa B June 18, 2023, 5:42 p.m. OK GNU C++17 (64) TESTS 8 15 0
210202627 HossamEssa B June 19, 2023, 4:58 a.m. OK GNU C++17 (64) TESTS 8 15 0
210201305 tan1shqc B June 19, 2023, 4:31 a.m. OK GNU C++17 (64) TESTS 8 15 0
210200078 Duck_sajin B June 19, 2023, 4:05 a.m. OK GNU C++17 (64) TESTS 8 15 0
210197087 wuyin331 B June 19, 2023, 3:09 a.m. OK GNU C++17 (64) TESTS 8 15 0
210195573 Qualified B June 19, 2023, 2:35 a.m. OK GNU C++17 (64) TESTS 8 15 0
210194662 Ceased.xp B June 19, 2023, 2:14 a.m. OK GNU C++17 (64) TESTS 8 15 0
210194582 Once_I_Liked_AGirl B June 19, 2023, 2:13 a.m. OK GNU C++17 (64) TESTS 8 15 0
210178155 YeongTree B June 18, 2023, 6:57 p.m. OK GNU C++17 (64) TESTS 8 15 0
210162572 Erering B June 18, 2023, 4:28 p.m. OK GNU C++20 (64) TESTS 8 0 0
210202537 Sy_03 B June 19, 2023, 4:56 a.m. OK GNU C++20 (64) TESTS 8 15 0
210202755 XeNAf_I B June 19, 2023, 5 a.m. OK GNU C++20 (64) TESTS 8 15 0
210203027 Jonas666 B June 19, 2023, 5:06 a.m. OK GNU C++20 (64) TESTS 8 15 0
210203719 Haitham_Abu_El_Nasr B June 19, 2023, 5:18 a.m. OK GNU C++20 (64) TESTS 8 15 0
210204298 YisrT3 B June 19, 2023, 5:28 a.m. OK GNU C++20 (64) TESTS 8 15 0
210204464 SkySummer B June 19, 2023, 5:32 a.m. OK GNU C++20 (64) TESTS 8 15 0
210204538 Akash_222311010 B June 19, 2023, 5:33 a.m. OK GNU C++20 (64) TESTS 8 15 0
210205660 chickbecamechicken B June 19, 2023, 5:51 a.m. OK GNU C++20 (64) TESTS 8 15 0
210206240 ShikharS B June 19, 2023, 6:01 a.m. OK GNU C++20 (64) TESTS 8 15 0
210173129 davi0015 B June 18, 2023, 5:54 p.m. OK Go TESTS 8 46 819200
210150146 anuhyakurre B June 18, 2023, 3:53 p.m. OK Go TESTS 8 841 1228800
210161625 .aditya. B June 18, 2023, 4:26 p.m. OK Go TESTS 8 873 1228800
210169718 vermadv2000 B June 18, 2023, 5:22 p.m. OK Java 11 TESTS 8 186 0
210168424 SkyTurtle B June 18, 2023, 5:12 p.m. OK Java 11 TESTS 8 187 0
210155502 themadknight45 B June 18, 2023, 4:08 p.m. OK Java 11 TESTS 8 187 0
210151963 vishal_sahu B June 18, 2023, 3:58 p.m. OK Java 11 TESTS 8 187 0
210149710 theSSS B June 18, 2023, 3:52 p.m. OK Java 11 TESTS 8 187 0
210205490 the_epsc B June 19, 2023, 5:49 a.m. OK Java 11 TESTS 8 202 0
210189473 MuhammD_husss B June 18, 2023, 11:31 p.m. OK Java 11 TESTS 8 202 0
210159215 r3hab.rs B June 18, 2023, 4:19 p.m. OK Java 11 TESTS 8 218 0
210154541 staticLake B June 18, 2023, 4:05 p.m. OK Java 11 TESTS 8 218 0
210152812 Yousef_Badr B June 18, 2023, 4 p.m. OK Java 11 TESTS 8 218 0
210157985 Saurabh_jayaswal B June 18, 2023, 4:15 p.m. OK Java 17 TESTS 8 186 0
210155834 parascoding1 B June 18, 2023, 4:09 p.m. OK Java 17 TESTS 8 202 0
210187713 Marbik B June 18, 2023, 10:25 p.m. OK Java 17 TESTS 8 202 512000
210152739 imvivekthakur B June 18, 2023, 4 p.m. OK Java 17 TESTS 8 217 0
210189847 mcrash12 B June 18, 2023, 11:44 p.m. OK Java 17 TESTS 8 217 204800
210173152 mo_heat B June 18, 2023, 5:54 p.m. OK Java 17 TESTS 8 233 0
210153893 v7fgg B June 18, 2023, 4:04 p.m. OK Java 17 TESTS 8 233 102400
210157365 Ritik009999 B June 18, 2023, 4:13 p.m. OK Java 17 TESTS 8 248 0
210169171 maksutovnurda B June 18, 2023, 5:17 p.m. OK Java 17 TESTS 8 248 409600
210150856 craddles B June 18, 2023, 3:55 p.m. OK Java 17 TESTS 8 264 0
210170597 OmarRoka29 B June 18, 2023, 5:29 p.m. OK Java 8 TESTS 8 108 0
210188274 prashanth_rebala B June 18, 2023, 10:45 p.m. OK Java 8 TESTS 8 109 0
210184999 EliudGarcia2004 B June 18, 2023, 9:04 p.m. OK Java 8 TESTS 8 109 0
210205612 2023_upsolver B June 19, 2023, 5:51 a.m. OK Java 8 TESTS 8 124 0
210149932 RahulAhuja2901 B June 18, 2023, 3:52 p.m. OK Java 8 TESTS 8 124 0
210151513 raj_shahh B June 18, 2023, 3:57 p.m. OK Java 8 TESTS 8 139 38297600
210150036 molecule03 B June 18, 2023, 3:52 p.m. OK Java 8 TESTS 8 140 38195200
210195359 999ms_Clutch B June 19, 2023, 2:30 a.m. OK Java 8 TESTS 8 155 39116800
210154499 The_terminator B June 18, 2023, 4:05 p.m. OK Java 8 TESTS 8 186 0
210177942 Sumitsingh7 B June 18, 2023, 6:54 p.m. OK Java 8 TESTS 8 218 5836800
210177373 gelbelachente B June 18, 2023, 6:45 p.m. OK Kotlin 1.7 TESTS 8 467 21708800
210156523 mkmsouti99 B June 18, 2023, 4:11 p.m. OK Kotlin 1.7 TESTS 8 670 52326400
210150809 Zahar2008 B June 18, 2023, 3:55 p.m. OK MS C++ 2017 TESTS 8 31 0
210165222 _vanger_ B June 18, 2023, 4:34 p.m. OK MS C++ 2017 TESTS 8 62 0
210201170 suraj112002 B June 19, 2023, 4:28 a.m. OK MS C++ 2017 TESTS 8 77 0
210152232 shushukl B June 18, 2023, 3:59 p.m. OK MS C++ 2017 TESTS 8 78 0
210169340 ahtoh_ B June 18, 2023, 5:19 p.m. OK Node.js TESTS 8 108 5836800
210164867 varrick B June 18, 2023, 4:34 p.m. OK Ocaml TESTS 8 31 204800
210154606 Gaurav1 B June 18, 2023, 4:06 p.m. OK PyPy 2 TESTS 8 249 4812800
210157379 AbdulRahmanLuai B June 18, 2023, 4:13 p.m. OK PyPy 3 TESTS 8 155 5632000
210148636 KeiTsukishima B June 18, 2023, 3:49 p.m. OK PyPy 3 TESTS 8 296 10137600
210158346 some_playa B June 18, 2023, 4:16 p.m. OK PyPy 3 TESTS 8 358 7680000
210158710 NitinG B June 18, 2023, 4:17 p.m. OK PyPy 3 TESTS 8 358 9420800
210192566 lucky_kushwaha B June 19, 2023, 1:16 a.m. OK PyPy 3 TESTS 8 358 9523200
210153601 akshitrathore1619 B June 18, 2023, 4:03 p.m. OK PyPy 3 TESTS 8 358 9523200
210156773 shadowfieend B June 18, 2023, 4:12 p.m. OK PyPy 3 TESTS 8 374 9625600
210167252 Asharma538 B June 18, 2023, 5:06 p.m. OK PyPy 3 TESTS 8 389 9625600
210162810 msaad01 B June 18, 2023, 4:29 p.m. OK PyPy 3 TESTS 8 389 9932800
210161031 Vashi B June 18, 2023, 4:24 p.m. OK PyPy 3 TESTS 8 452 9932800
210194776 chry607 B June 19, 2023, 2:17 a.m. OK PyPy 3-64 TESTS 8 77 3481600
210161541 th2990 B June 18, 2023, 4:25 p.m. OK PyPy 3-64 TESTS 8 77 4198400
210192373 carol5s B June 19, 2023, 1:10 a.m. OK PyPy 3-64 TESTS 8 93 7168000
210149724 Tanz B June 18, 2023, 3:52 p.m. OK PyPy 3-64 TESTS 8 124 7987200
210202528 prashanttholia B June 19, 2023, 4:56 a.m. OK PyPy 3-64 TESTS 8 124 8806400
210173916 tomasnyberg B June 18, 2023, 6:03 p.m. OK PyPy 3-64 TESTS 8 124 9113600
210157415 Remineva B June 18, 2023, 4:14 p.m. OK PyPy 3-64 TESTS 8 124 9625600
210202009 nealzane B June 19, 2023, 4:46 a.m. OK PyPy 3-64 TESTS 8 139 9011200
210206147 1_2_3_4_5_9 B June 19, 2023, 6 a.m. OK PyPy 3-64 TESTS 8 140 17408000
210195903 RetiredNanfeng B June 19, 2023, 2:42 a.m. OK PyPy 3-64 TESTS 8 155 9728000
210200949 AD0 B June 19, 2023, 4:23 a.m. OK Python 3 TESTS 8 62 102400
210175398 torqueaj B June 18, 2023, 6:20 p.m. OK Python 3 TESTS 8 62 716800
210171834 solitaryReaper B June 18, 2023, 5:41 p.m. OK Python 3 TESTS 8 77 204800
210158505 Faithnhope B June 18, 2023, 4:17 p.m. OK Python 3 TESTS 8 77 1331200
210154802 atomicapple0 B June 18, 2023, 4:06 p.m. OK Python 3 TESTS 8 78 204800
210149540 fridalex007 B June 18, 2023, 3:51 p.m. OK Python 3 TESTS 8 93 307200
210172640 okay4869 B June 18, 2023, 5:49 p.m. OK Python 3 TESTS 8 108 0
210163676 Bharathkv_2021362 B June 18, 2023, 4:31 p.m. OK Python 3 TESTS 8 108 0
210178528 shikhar_8935 B June 18, 2023, 7:03 p.m. OK Python 3 TESTS 8 109 0
210173216 Sarath027 B June 18, 2023, 5:55 p.m. OK Python 3 TESTS 8 109 0
210154402 vardhana_1 B June 18, 2023, 4:05 p.m. OK Ruby 3 TESTS 8 280 204800
210159428 ArnedeB B June 18, 2023, 4:19 p.m. OK Rust 2021 TESTS 8 109 0
210155910 cherryboom_me B June 18, 2023, 4:09 p.m. OK Rust 2021 TESTS 8 109 0
210153175 Tuhil B June 18, 2023, 4:01 p.m. OK Rust 2021 TESTS 8 109 0
210160931 riverbl B June 18, 2023, 4:24 p.m. OK Rust 2021 TESTS 8 124 0
210156381 2000031648 B June 18, 2023, 4:11 p.m. OK Scala TESTS 8 701 0

remove filters

Back to search problems