Codeforces Round 892 (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
1859 Codeforces Round 892 (Div. 2) FINISHED False 7200 39972299 Aug. 12, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 27854 ) B Olya and Game with Arrays PROGRAMMING constructive algorithms greedy math sortings

B'Artem suggested a game to the girl Olya. There is a list of n arrays, where the i -th array contains m_i ge 2 positive integers a_{i,1}, a_{i,2}, ldots, a_{i,m_i} . Olya can move at most one (possibly 0 ) integer from each array to another array. Note that integers can be moved from one array only once, but integers can be added to one array multiple times, and all the movements are done at the same time. The beauty of the list of arrays is defined as the sum sum_{i=1}^n min_{j=1}^{m_i} a_{i,j} . In other words, for each array, we find the minimum value in it and then sum up these values. The goal of the game is to maximize the beauty of the list of arrays. Help Olya win this challenging game! Each test consists of multiple test cases. The first line contains a single integer t ( 1 <= t <= 25000 ) -- the number of test cases. The description of test cases follows. The first line of each test case contains a single integer n ( 1 <= n <= 25000 ) -- the number of arrays in the list. This is followed by descriptions of the arrays. Each array description consists of two lines. The first line contains a single integer m_i ( 2 <= m_i <= 50000 ) -- the number of elements in the i -th array. The next line contains m_i integers a_{i, 1}, a_{i, 2}, ldots, a_{i, m_i} ( 1 <= a_{i,j} <= 10^9 ) -- the elements of the i -th array. It is guaranteed that the sum of m_i over all test cases does not exceed 50000 . For each test case, output a single line containing a single integer -- the maximum beauty of the list of arrays that Olya can achieve. In the first test case, we can move the integer 3 from the second array to the first array. Then the beauty is min(1, 2, 3) + min(4) = 5 . It can be shown that this is the maximum possible beauty. In the second test case, there is only one array, so regardless of the movements, the beauty will be min('...

Tutorials

Video solutions from Geothermal.

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
218572179 chrisTris B Aug. 12, 2023, 4:24 p.m. OK C# 10 TESTS 15 62 5324800
218603759 Suryanshsk_ofcl B Aug. 12, 2023, 9:03 p.m. OK Clang++20 Diagnostics TESTS 15 545 12595200
218599633 swayingdream B Aug. 12, 2023, 8 p.m. OK GNU C11 TESTS 15 46 204800
218581854 impawstarlight B Aug. 12, 2023, 5:16 p.m. OK GNU C11 TESTS 15 124 204800
218589405 notpiroAG B Aug. 12, 2023, 6:08 p.m. OK GNU C11 TESTS 15 124 204800
218614621 altper B Aug. 13, 2023, 1:45 a.m. OK GNU C11 TESTS 15 124 204800
218594909 jmawa1163 B Aug. 12, 2023, 7:03 p.m. OK GNU C11 TESTS 15 124 409600
218605197 chronosdhillon B Aug. 12, 2023, 9:28 p.m. OK GNU C11 TESTS 15 124 1228800
218588685 pHySiCsBoY B Aug. 12, 2023, 6:02 p.m. OK GNU C11 TESTS 15 140 921600
218593484 Maharia_Anil B Aug. 12, 2023, 6:46 p.m. OK GNU C++14 TESTS 15 31 0
218593558 Maharia_Anil B Aug. 12, 2023, 6:47 p.m. OK GNU C++14 TESTS 15 31 0
218615545 khanhdungtrinh B Aug. 13, 2023, 2:05 a.m. OK GNU C++14 TESTS 15 31 0
218576432 wjiay B Aug. 12, 2023, 4:33 p.m. OK GNU C++14 TESTS 15 31 0
218614163 hzy99999 B Aug. 13, 2023, 1:36 a.m. OK GNU C++14 TESTS 15 31 102400
218603003 muhammadabrar B Aug. 12, 2023, 8:50 p.m. OK GNU C++14 TESTS 15 31 204800
218590470 s_u_nt B Aug. 12, 2023, 6:17 p.m. OK GNU C++14 TESTS 15 31 204800
218587396 HaciyevAlik B Aug. 12, 2023, 5:52 p.m. OK GNU C++14 TESTS 15 31 204800
218612238 FOX-index B Aug. 13, 2023, 12:46 a.m. OK GNU C++14 TESTS 15 31 204800
218623466 thcs2nguyen B Aug. 13, 2023, 4:30 a.m. OK GNU C++14 TESTS 16 31 204800
218581710 unknown-03 B Aug. 12, 2023, 5:16 p.m. OK GNU C++17 TESTS 15 30 204800
218588058 ankit277 B Aug. 12, 2023, 5:57 p.m. OK GNU C++17 TESTS 15 31 0
218580187 Jakaria030 B Aug. 12, 2023, 5:09 p.m. OK GNU C++17 TESTS 15 31 0
218593937 _Abdelsalam_ B Aug. 12, 2023, 6:51 p.m. OK GNU C++17 TESTS 15 31 0
218625526 trungthanh1601 B Aug. 13, 2023, 5 a.m. OK GNU C++17 TESTS 16 31 0
218610692 Comical-Drone B Aug. 12, 2023, 11:53 p.m. OK GNU C++17 TESTS 15 31 0
218588104 dragon6tiger2 B Aug. 12, 2023, 5:57 p.m. OK GNU C++17 TESTS 15 31 0
218627311 wibulord B Aug. 13, 2023, 5:25 a.m. OK GNU C++17 TESTS 16 31 0
218616719 kilaney B Aug. 13, 2023, 2:28 a.m. OK GNU C++17 TESTS 15 31 0
218617800 Jhon.k B Aug. 13, 2023, 2:50 a.m. OK GNU C++17 TESTS 15 31 0
218571385 youmi_45 B Aug. 12, 2023, 4:22 p.m. OK GNU C++17 (64) TESTS 15 30 1126400
218609455 hhux B Aug. 12, 2023, 11:12 p.m. OK GNU C++17 (64) TESTS 15 30 1126400
218574984 belphegor_ B Aug. 12, 2023, 4:30 p.m. OK GNU C++17 (64) TESTS 15 30 1638400
218599539 Krzychuo B Aug. 12, 2023, 7:59 p.m. OK GNU C++17 (64) TESTS 15 31 0
218622268 stop B Aug. 13, 2023, 4:11 a.m. OK GNU C++17 (64) TESTS 16 31 0
218621096 imsuck12 B Aug. 13, 2023, 3:51 a.m. OK GNU C++17 (64) TESTS 16 31 0
218613739 zwh_zzz B Aug. 13, 2023, 1:26 a.m. OK GNU C++17 (64) TESTS 15 31 0
218605740 Fast_submit B Aug. 12, 2023, 9:39 p.m. OK GNU C++17 (64) TESTS 15 31 0
218589080 HarshiL_MalanI07 B Aug. 12, 2023, 6:06 p.m. OK GNU C++17 (64) TESTS 15 31 0
218589625 Mahmoud_Alaaraj B Aug. 12, 2023, 6:10 p.m. OK GNU C++17 (64) TESTS 15 31 204800
218629207 Anonymous_chief B Aug. 13, 2023, 5:51 a.m. OK GNU C++20 (64) TESTS 16 15 0
218593734 wakaka B Aug. 12, 2023, 6:49 p.m. OK GNU C++20 (64) TESTS 15 15 0
218581556 riverwalk7 B Aug. 12, 2023, 5:15 p.m. OK GNU C++20 (64) TESTS 15 15 0
218581947 KI_rule B Aug. 12, 2023, 5:17 p.m. OK GNU C++20 (64) TESTS 15 15 0
218582824 janahmed B Aug. 12, 2023, 5:21 p.m. OK GNU C++20 (64) TESTS 15 15 0
218625438 sarthaknirgude01 B Aug. 13, 2023, 4:59 a.m. OK GNU C++20 (64) TESTS 16 15 0
218588484 gs1220 B Aug. 12, 2023, 6 p.m. OK GNU C++20 (64) TESTS 15 15 307200
218612813 Turing_Sheep B Aug. 13, 2023, 1:02 a.m. OK GNU C++20 (64) TESTS 15 15 409600
218624854 elsisi252 B Aug. 13, 2023, 4:51 a.m. OK GNU C++20 (64) TESTS 16 15 512000
218628274 Plabs B Aug. 13, 2023, 5:38 a.m. OK GNU C++20 (64) TESTS 16 15 512000
218581302 dwoolley3 B Aug. 12, 2023, 5:14 p.m. OK Java 11 TESTS 15 187 0
218623968 Harshvardhan_Codeforces B Aug. 13, 2023, 4:37 a.m. OK Java 11 TESTS 16 202 0
218590844 dzhi B Aug. 12, 2023, 6:21 p.m. OK Java 11 TESTS 15 202 0
218605735 Amir_Tarek B Aug. 12, 2023, 9:39 p.m. OK Java 11 TESTS 15 280 0
218588527 black_devil_9552 B Aug. 12, 2023, 6:01 p.m. OK Java 11 TESTS 15 311 0
218582923 polsage B Aug. 12, 2023, 5:22 p.m. OK Java 11 TESTS 15 311 0
218597205 Harwinvanak B Aug. 12, 2023, 7:29 p.m. OK Java 11 TESTS 15 342 0
218594895 Anmol081202 B Aug. 12, 2023, 7:03 p.m. OK Java 11 TESTS 15 358 0
218571875 Harwinvanak B Aug. 12, 2023, 4:23 p.m. OK Java 11 TESTS 15 389 0
218594646 duped321 B Aug. 12, 2023, 7 p.m. OK Java 11 TESTS 15 451 0
218620057 yousef03 B Aug. 13, 2023, 3:33 a.m. OK Java 17 TESTS 16 217 0
218574403 anurag_cf97 B Aug. 12, 2023, 4:29 p.m. OK Java 17 TESTS 15 218 512000
218572700 Yashraj_IITP B Aug. 12, 2023, 4:25 p.m. OK Java 17 TESTS 15 218 512000
218582607 daksh_02 B Aug. 12, 2023, 5:20 p.m. OK Java 17 TESTS 15 233 204800
218580148 dakshkhullar14 B Aug. 12, 2023, 5:09 p.m. OK Java 17 TESTS 15 233 204800
218606294 vikash_45 B Aug. 12, 2023, 9:52 p.m. OK Java 17 TESTS 15 249 409600
218581819 raito3z B Aug. 12, 2023, 5:16 p.m. OK Java 17 TESTS 15 264 716800
218585958 AKhacks B Aug. 12, 2023, 5:41 p.m. OK Java 17 TESTS 15 265 409600
218611716 fightingxjz B Aug. 13, 2023, 12:30 a.m. OK Java 17 TESTS 15 280 204800
218571861 coolkhanna31 B Aug. 12, 2023, 4:23 p.m. OK Java 17 TESTS 15 280 204800
218615832 Nanthakumar06 B Aug. 13, 2023, 2:10 a.m. OK Java 8 TESTS 15 124 0
218602709 ManikantanV B Aug. 12, 2023, 8:46 p.m. OK Java 8 TESTS 15 124 0
218594106 Yousef_Badr B Aug. 12, 2023, 6:53 p.m. OK Java 8 TESTS 15 124 0
218584157 dhruvil8804 B Aug. 12, 2023, 5:29 p.m. OK Java 8 TESTS 15 124 0
218571999 AlterAccount B Aug. 12, 2023, 4:24 p.m. OK Java 8 TESTS 15 124 0
218620589 lpychemistry B Aug. 13, 2023, 3:43 a.m. OK Java 8 TESTS 16 140 0
218591979 ahmedTarek28 B Aug. 12, 2023, 6:30 p.m. OK Java 8 TESTS 15 140 0
218582452 Sanat04 B Aug. 12, 2023, 5:19 p.m. OK Java 8 TESTS 15 155 0
218584980 Swilled7 B Aug. 12, 2023, 5:35 p.m. OK Java 8 TESTS 15 234 0
218604066 Zakaria_Eysa B Aug. 12, 2023, 9:08 p.m. OK Java 8 TESTS 15 264 0
218574708 callbackcats_669 B Aug. 12, 2023, 4:29 p.m. OK Kotlin 1.7 TESTS 15 592 47820800
218618155 hnust_panyuankui B Aug. 13, 2023, 2:57 a.m. OK MS C++ 2017 TESTS 15 31 409600
218620417 alex0511 B Aug. 13, 2023, 3:39 a.m. OK MS C++ 2017 TESTS 16 78 921600
218594444 madhuroshan B Aug. 12, 2023, 6:57 p.m. OK MS C++ 2017 TESTS 15 93 307200
218574262 ooomm B Aug. 12, 2023, 4:28 p.m. OK MS C++ 2017 TESTS 15 155 5427200
218607870 Dowtai B Aug. 12, 2023, 10:27 p.m. OK MS C++ 2017 TESTS 15 171 0
218586126 Kvazarus B Aug. 12, 2023, 5:42 p.m. OK MS C++ 2017 TESTS 15 171 0
218587457 18_kkhaki B Aug. 12, 2023, 5:52 p.m. OK MS C++ 2017 TESTS 15 171 204800
218574995 ag8350961 B Aug. 12, 2023, 4:30 p.m. OK MS C++ 2017 TESTS 15 171 1638400
218594255 amit_shinde B Aug. 12, 2023, 6:55 p.m. OK MS C++ 2017 TESTS 15 186 409600
218576476 harsh2004sinha B Aug. 12, 2023, 4:33 p.m. OK MS C++ 2017 TESTS 15 186 1024000
218614207 Keval_78 B Aug. 13, 2023, 1:37 a.m. OK PyPy 3 TESTS 15 218 72396800
218608187 KamillaRa B Aug. 12, 2023, 10:35 p.m. OK PyPy 3 TESTS 15 670 9420800
218585100 momenelmesady4803 B Aug. 12, 2023, 5:35 p.m. OK PyPy 3 TESTS 15 670 9932800
218589149 sagarpm18 B Aug. 12, 2023, 6:06 p.m. OK PyPy 3 TESTS 15 810 9625600
218622384 Wooly18 B Aug. 13, 2023, 4:13 a.m. OK PyPy 3 TESTS 16 857 9932800
218581779 aviral311 B Aug. 12, 2023, 5:16 p.m. OK PyPy 3-64 TESTS 15 124 7168000
218622954 dirac_de B Aug. 13, 2023, 4:22 a.m. OK PyPy 3-64 TESTS 16 155 9216000
218585243 MistaFlash B Aug. 12, 2023, 5:36 p.m. OK PyPy 3-64 TESTS 15 170 9420800
218596342 supperhammad2002 B Aug. 12, 2023, 7:19 p.m. OK PyPy 3-64 TESTS 15 171 10854400
218586460 pcm_op B Aug. 12, 2023, 5:45 p.m. OK PyPy 3-64 TESTS 15 186 9011200
218586121 aayush_chhabra B Aug. 12, 2023, 5:42 p.m. OK PyPy 3-64 TESTS 15 202 10342400
218617921 emifly B Aug. 13, 2023, 2:52 a.m. OK PyPy 3-64 TESTS 15 514 9932800
218584460 abdheshdash8 B Aug. 12, 2023, 5:31 p.m. OK PyPy 3-64 TESTS 15 576 13312000
218594241 proguy20211510 B Aug. 12, 2023, 6:55 p.m. OK PyPy 3-64 TESTS 15 592 10956800
218592294 chibizzzzz B Aug. 12, 2023, 6:33 p.m. OK PyPy 3-64 TESTS 15 608 9728000
218585403 alenavinogradova B Aug. 12, 2023, 5:37 p.m. OK Python 3 TESTS 15 108 2457600
218585572 ProCoder12 B Aug. 12, 2023, 5:38 p.m. OK Python 3 TESTS 15 109 1126400
218595378 Athlete_7 B Aug. 12, 2023, 7:08 p.m. OK Python 3 TESTS 15 140 4812800
218582977 bugmaker_bgbg B Aug. 12, 2023, 5:22 p.m. OK Python 3 TESTS 15 155 5120000
218571244 quizard B Aug. 12, 2023, 4:22 p.m. OK Python 3 TESTS 15 233 2252800
218616580 wake__up B Aug. 13, 2023, 2:25 a.m. OK Python 3 TESTS 15 233 3072000
218573026 sanjanapatel238 B Aug. 12, 2023, 4:26 p.m. OK Python 3 TESTS 15 249 102400
218575075 templuckycoder555 B Aug. 12, 2023, 4:30 p.m. OK Python 3 TESTS 15 249 1126400
218573524 Anupam_1925 B Aug. 12, 2023, 4:27 p.m. OK Python 3 TESTS 15 249 2252800
218573380 KLU_2100080008 B Aug. 12, 2023, 4:27 p.m. OK Python 3 TESTS 15 249 2560000
218605961 0x81 B Aug. 12, 2023, 9:44 p.m. OK Ruby 3 TESTS 15 390 2764800
218617630 galexwong B Aug. 13, 2023, 2:46 a.m. OK Rust 2021 TESTS 15 31 0

remove filters

Back to search problems