Codeforces Round 902 (Div. 1, based on COMPFEST 15 - Final Round)

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
1876 Codeforces Round 902 (Div. 1, based on COMPFEST 15 - Final Round) FINISHED False 9000 35067299 Oct. 8, 2023, 9:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 18478 ) A Helmets in Night Light PROGRAMMING greedy sortings

B'Pak Chanek is the chief of a village named Khuntien. On one night filled with lights, Pak Chanek has a sudden and important announcement that needs to be notified to all of the n residents in Khuntien. First, Pak Chanek shares the announcement directly to one or more residents with a cost of p for each person. After that, the residents can share the announcement to other residents using a magical helmet-shaped device. However, there is a cost for using the helmet-shaped device. For each i , if the i -th resident has got the announcement at least once (either directly from Pak Chanek or from another resident), he/she can share the announcement to at most a_i other residents with a cost of b_i for each share. If Pak Chanek can also control how the residents share the announcement to other residents, what is the minimum cost for Pak Chanek to notify all n residents of Khuntien about the announcement? Each test contains multiple test cases. The first line contains an integer t ( 1 <= q t <= q 10^4 ) -- the number of test cases. The following lines contain the description of each test case. The first line contains two integers n and p ( 1 <= q n <= q 10^5 ; 1 <= q p <= q 10^5 ) -- the number of residents and the cost for Pak Chanek to share the announcement directly to one resident. The second line contains n integers a_1,a_2,a_3, ldots,a_n ( 1 <= q a_i <= q10^5 ) -- the maximum number of residents that each resident can share the announcement to. The third line contains n integers b_1,b_2,b_3, ldots,b_n ( 1 <= q b_i <= q10^5 ) -- the cost for each resident to share the announcement to one other resident. It is guaranteed that the sum of n over all test cases does not exceed 10^5 . For each test case, output a line containing an integer representing the minimum cost to notify all n residents of Khuntien about the announcement. In the first tes'...

Tutorials

Codeforces Round #902 (Div. 1, Div. 2, based on COMPFEST 15 — Final Round) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
227121497 mban259 A Oct. 8, 2023, 9:13 a.m. OK C# 10 TESTS 44 171 24371200
227120049 KumaTachiRen A Oct. 8, 2023, 9:11 a.m. OK C# 8 TESTS 44 202 3584000
227126939 tgehr A Oct. 8, 2023, 9:21 a.m. OK D TESTS 44 109 13721600
227122034 Gassa A Oct. 8, 2023, 9:14 a.m. OK D TESTS 44 217 24576000
227123421 hos.lyric A Oct. 8, 2023, 9:16 a.m. OK D TESTS 44 265 30617600
227123244 chro4896 A Oct. 8, 2023, 9:15 a.m. OK GNU C11 TESTS 44 109 819200
227118948 TeasingMaster A Oct. 8, 2023, 9:10 a.m. OK GNU C++14 TESTS 44 30 2662400
227122776 erduolong A Oct. 8, 2023, 9:15 a.m. OK GNU C++14 TESTS 44 31 2867200
227122017 jiangtaizhe001 A Oct. 8, 2023, 9:14 a.m. OK GNU C++14 TESTS 44 31 2867200
227123422 liang_cheng A Oct. 8, 2023, 9:16 a.m. OK GNU C++14 TESTS 44 31 5017600
227124151 A_Pikachu A Oct. 8, 2023, 9:17 a.m. OK GNU C++14 TESTS 44 31 9216000
227122275 XZC__Bobby A Oct. 8, 2023, 9:14 a.m. OK GNU C++14 TESTS 44 61 1228800
227263136 _Diu_ A Oct. 9, 2023, 1:27 a.m. OK GNU C++14 TESTS 44 62 819200
227259449 oier_lyb A Oct. 8, 2023, 11:44 p.m. OK GNU C++14 TESTS 44 62 819200
227259347 lfxxx A Oct. 8, 2023, 11:41 p.m. OK GNU C++14 TESTS 44 62 819200
227256442 newamnesia A Oct. 8, 2023, 10:08 p.m. OK GNU C++14 TESTS 44 62 819200
227121153 Pompeii A Oct. 8, 2023, 9:13 a.m. OK GNU C++17 TESTS 44 30 2252800
227125596 ms_crystal_ship A Oct. 8, 2023, 9:19 a.m. OK GNU C++17 TESTS 44 31 1126400
227129063 pmt2018 A Oct. 8, 2023, 9:24 a.m. OK GNU C++17 TESTS 44 31 2969600
227121074 ImmortaLimit A Oct. 8, 2023, 9:12 a.m. OK GNU C++17 TESTS 44 31 19251200
227210693 superMOOZ A Oct. 8, 2023, 2:39 p.m. OK GNU C++17 TESTS 44 46 819200
227124067 bashunowant A Oct. 8, 2023, 9:17 a.m. OK GNU C++17 TESTS 44 62 819200
227122251 VesselinMarkovich A Oct. 8, 2023, 9:14 a.m. OK GNU C++17 TESTS 44 62 819200
227121750 YES_wc A Oct. 8, 2023, 9:13 a.m. OK GNU C++17 TESTS 44 62 819200
227120528 Kochou_Shinobu A Oct. 8, 2023, 9:12 a.m. OK GNU C++17 TESTS 44 62 819200
227118640 Roundgod A Oct. 8, 2023, 9:09 a.m. OK GNU C++17 TESTS 44 62 819200
227116913 QAQAutoMaton A Oct. 8, 2023, 9:08 a.m. OK GNU C++17 (64) TESTS 44 31 5836800
227202918 trainwithoutpain A Oct. 8, 2023, 1:43 p.m. OK GNU C++17 (64) TESTS 44 46 819200
227177938 yangjl A Oct. 8, 2023, 11:11 a.m. OK GNU C++17 (64) TESTS 44 46 819200
227131837 DaniraSilla A Oct. 8, 2023, 9:29 a.m. OK GNU C++17 (64) TESTS 44 46 819200
227130099 Wielomian A Oct. 8, 2023, 9:26 a.m. OK GNU C++17 (64) TESTS 44 46 819200
227124993 Warriors_fsy A Oct. 8, 2023, 9:18 a.m. OK GNU C++17 (64) TESTS 44 46 819200
227122256 JCY_ A Oct. 8, 2023, 9:14 a.m. OK GNU C++17 (64) TESTS 44 46 819200
227121849 2077nirundong A Oct. 8, 2023, 9:14 a.m. OK GNU C++17 (64) TESTS 44 46 819200
227121357 K-H A Oct. 8, 2023, 9:13 a.m. OK GNU C++17 (64) TESTS 44 46 819200
227121296 p_b_p_b A Oct. 8, 2023, 9:13 a.m. OK GNU C++17 (64) TESTS 44 46 819200
227116507 cmk666 A Oct. 8, 2023, 9:07 a.m. OK GNU C++20 (64) TESTS 44 31 1331200
227119299 jiangly_fan A Oct. 8, 2023, 9:10 a.m. OK GNU C++20 (64) TESTS 44 31 1638400
227121845 N_z__ A Oct. 8, 2023, 9:14 a.m. OK GNU C++20 (64) TESTS 44 31 1740800
227120241 shiomusubi496 A Oct. 8, 2023, 9:11 a.m. OK GNU C++20 (64) TESTS 44 31 3686400
227118212 maspy A Oct. 8, 2023, 9:09 a.m. OK GNU C++20 (64) TESTS 44 31 5222400
227124931 Sakuyalove A Oct. 8, 2023, 9:18 a.m. OK GNU C++20 (64) TESTS 44 31 6348800
227120660 Legitimity A Oct. 8, 2023, 9:12 a.m. OK GNU C++20 (64) TESTS 44 31 6553600
227133352 Zhouershan A Oct. 8, 2023, 9:31 a.m. OK GNU C++20 (64) TESTS 44 31 9523200
227119256 jiangbowen A Oct. 8, 2023, 9:10 a.m. OK GNU C++20 (64) TESTS 44 31 18022400
227127562 c1120231020 A Oct. 8, 2023, 9:22 a.m. OK GNU C++20 (64) TESTS 44 31 18124800
227121309 profchi A Oct. 8, 2023, 9:13 a.m. OK Java 11 TESTS 44 265 2150400
227122827 knightL A Oct. 8, 2023, 9:15 a.m. OK Java 11 TESTS 44 311 1024000
227202126 PhantomLordfromKillemAll A Oct. 8, 2023, 1:38 p.m. OK Java 21 TESTS 44 607 0
227193768 safarisoul A Oct. 8, 2023, 12:45 p.m. OK Java 8 TESTS 44 202 0
227121617 Tlatoani A Oct. 8, 2023, 9:13 a.m. OK Kotlin 1.6 TESTS 44 452 11161600
227241903 sharingan2077 A Oct. 8, 2023, 6:46 p.m. OK MS C++ 2017 TESTS 44 202 4096000
227121462 Wooly18 A Oct. 8, 2023, 9:13 a.m. OK PyPy 3 TESTS 44 467 13824000
227233900 rishabhsingh054 A Oct. 8, 2023, 5:37 p.m. OK PyPy 3 TESTS 44 607 15257600
227121630 Mukundan314 A Oct. 8, 2023, 9:13 a.m. OK PyPy 3-64 TESTS 44 233 21504000
227120031 toam A Oct. 8, 2023, 9:11 a.m. OK PyPy 3-64 TESTS 44 248 19251200
227119126 dyppp A Oct. 8, 2023, 9:10 a.m. OK PyPy 3-64 TESTS 44 264 23040000
227128356 jimini23kjm A Oct. 8, 2023, 9:23 a.m. OK PyPy 3-64 TESTS 44 280 23244800
227121747 chinerist A Oct. 8, 2023, 9:13 a.m. OK PyPy 3-64 TESTS 44 295 21299200
227135252 Alex239 A Oct. 8, 2023, 9:35 a.m. OK PyPy 3-64 TESTS 44 374 18636800
227122748 alexwice A Oct. 8, 2023, 9:15 a.m. OK PyPy 3-64 TESTS 44 389 24985600
227126344 tassei903 A Oct. 8, 2023, 9:20 a.m. OK PyPy 3-64 TESTS 44 404 19968000
227215589 ct17 A Oct. 8, 2023, 3:12 p.m. OK PyPy 3-64 TESTS 44 405 21401600
227272803 BlitherBoom812 A Oct. 9, 2023, 4:43 a.m. OK PyPy 3-64 TESTS 44 483 14233600
227200828 Jimanbanashi A Oct. 8, 2023, 1:29 p.m. OK Python 2 TESTS 44 233 9830400
227273130 BlitherBoom812 A Oct. 9, 2023, 4:48 a.m. OK Python 3 TESTS 44 171 18636800
227273998 BlitherBoom812 A Oct. 9, 2023, 5:01 a.m. OK Python 3 TESTS 44 186 18636800
227258370 izhang22 A Oct. 8, 2023, 11:07 p.m. OK Python 3 TESTS 44 217 19353600
227227010 saimahitha4225 A Oct. 8, 2023, 4:39 p.m. OK Python 3 TESTS 44 233 18227200
227216896 liujg3 A Oct. 8, 2023, 3:21 p.m. OK Python 3 TESTS 44 249 18227200
227124788 shade34 A Oct. 8, 2023, 9:18 a.m. OK Python 3 TESTS 44 373 20070400
227246041 FisherC A Oct. 8, 2023, 7:28 p.m. OK Python 3 TESTS 44 373 22323200
227128078 Egor A Oct. 8, 2023, 9:23 a.m. OK Rust 2021 TESTS 44 46 3276800
227119594 qwerty787788 A Oct. 8, 2023, 9:11 a.m. OK Rust 2021 TESTS 44 46 3993600
227119199 sansen A Oct. 8, 2023, 9:10 a.m. OK Rust 2021 TESTS 44 46 7987200
227123784 andrey.m A Oct. 8, 2023, 9:16 a.m. OK Rust 2021 TESTS 44 139 8192000

remove filters

Back to search problems