Codeforces Round 1050 (Div. 4)

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
2148 Codeforces Round 1050 (Div. 4) FINISHED False 8100 18631523 Sept. 13, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 6539 ) F Gravity Falls PROGRAMMING greedy implementation sortings

Farmer John has (n) arrays (a_1, a_2, \ldots, a_n) that may have different lengths. He will stack the arrays on top of each other, resulting in a grid with (n) rows. The arrays are left-aligned and can be stacked in any order he desires. Then, gravity will take place. Any cell that is not on the bottom row and does not have an element beneath it will fall down a row. This process will be repeated until there are no cells that satisfy the aforementioned constraint. Over all possible ways FJ can stack the arrays, output the lexicographically minimum bottom row after gravity takes place. The first line contains (t) ((1 \leq t \leq 1000)) — the number of test cases. The first line of each test case contains (n) ((1 \leq n \leq 2 \cdot 10^5)). For the following (n) lines, the first integer (k_i) ((1 \leq k \leq 2 \cdot 10^5)) denotes the length of (a_i). Then, (k_i) space-separated integers (a_{i_1}, a_{i_2}, \ldots, a_{i_{k_i}}) follow ((1 \leq a_{i_j} \leq 2 \cdot 10^5)). It is guaranteed that the sum of (n) and the sum of all (k_i) over all test cases does not exceed (2 \cdot 10^5). For each test case, output the lexicographically minimum bottom row on a new line. Demonstration for test case 2: Demonstration for test case 4:

Tutorials

Codeforces Round 1050 (Div. 4) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
338629420 og.kostya F Sept. 14, 2025, 4:14 p.m. OK C# 10 TESTS 34 108 10444800
338629371 og.kostya F Sept. 14, 2025, 4:14 p.m. OK C# 13 TESTS 34 140 10752000
338603308 ksandr1v F Sept. 14, 2025, 12:37 p.m. OK C# 13 TESTS 34 171 22630400
338586622 chrisTris F Sept. 14, 2025, 10:35 a.m. OK C# 13 TESTS 34 249 35225600
338634666 m1_k3 F Sept. 14, 2025, 5:09 p.m. OK C# 13 TESTS 34 1983 17203200
338629421 ahmed-shamim F Sept. 14, 2025, 4:14 p.m. OK C++17 (GCC 7-32) TESTS 34 109 1843200
338654045 hoseiintech F Sept. 14, 2025, 10:21 p.m. OK C++17 (GCC 7-32) TESTS 34 124 1843200
338611754 schindleriapraematurus F Sept. 14, 2025, 1:44 p.m. OK C++17 (GCC 7-32) TESTS 34 124 1843200
338575128 thesatyamxyz F Sept. 14, 2025, 9:01 a.m. OK C++17 (GCC 7-32) TESTS 34 124 1843200
338670923 Khoz F Sept. 15, 2025, 4:40 a.m. OK C++17 (GCC 7-32) TESTS 34 124 1945600
338608668 re_start_ F Sept. 14, 2025, 1:20 p.m. OK C++17 (GCC 7-32) TESTS 34 124 1945600
338581900 yairr F Sept. 14, 2025, 9:56 a.m. OK C++17 (GCC 7-32) TESTS 34 124 2662400
338586453 lotusblume F Sept. 14, 2025, 10:34 a.m. OK C++17 (GCC 7-32) TESTS 34 124 5017600
338587688 lotusblume F Sept. 14, 2025, 10:44 a.m. OK C++17 (GCC 7-32) TESTS 34 125 1843200
338557564 Dhanush_Yarragunta F Sept. 14, 2025, 5:18 a.m. OK C++17 (GCC 7-32) TESTS 34 125 1843200
338547623 convie F Sept. 14, 2025, 2:23 a.m. OK C++20 (GCC 13-64) TESTS 34 93 73932800
338618219 Abo_Adel F Sept. 14, 2025, 2:36 p.m. OK C++20 (GCC 13-64) TESTS 34 108 4505600
338656315 Jhapplu F Sept. 14, 2025, 11:48 p.m. OK C++20 (GCC 13-64) TESTS 34 109 4505600
338653735 Vingw009 F Sept. 14, 2025, 10:10 p.m. OK C++20 (GCC 13-64) TESTS 34 109 4505600
338644852 kirilllit228335 F Sept. 14, 2025, 7:06 p.m. OK C++20 (GCC 13-64) TESTS 34 109 4505600
338644784 AbsurdMan F Sept. 14, 2025, 7:05 p.m. OK C++20 (GCC 13-64) TESTS 34 109 4505600
338609895 The_RK F Sept. 14, 2025, 1:29 p.m. OK C++20 (GCC 13-64) TESTS 34 109 4505600
338595293 sam990 F Sept. 14, 2025, 11:43 a.m. OK C++20 (GCC 13-64) TESTS 34 109 4505600
338542260 shekharsuman0397 F Sept. 14, 2025, 12:12 a.m. OK C++20 (GCC 13-64) TESTS 34 109 4505600
338656213 Jhapplu F Sept. 14, 2025, 11:43 p.m. OK C++20 (GCC 13-64) TESTS 34 109 4608000
338638905 zundamon F Sept. 14, 2025, 5:54 p.m. OK C++23 (GCC 14-64, msys2) TESTS 34 77 16076800
338551441 BlazeH F Sept. 14, 2025, 3:36 a.m. OK C++23 (GCC 14-64, msys2) TESTS 34 93 5939200
338547442 m_conq F Sept. 14, 2025, 2:20 a.m. OK C++23 (GCC 14-64, msys2) TESTS 34 93 9318400
338547405 mfaiz_1 F Sept. 14, 2025, 2:19 a.m. OK C++23 (GCC 14-64, msys2) TESTS 34 93 9318400
338638635 zundamon F Sept. 14, 2025, 5:51 p.m. OK C++23 (GCC 14-64, msys2) TESTS 34 93 16179200
338636768 zundamon F Sept. 14, 2025, 5:31 p.m. OK C++23 (GCC 14-64, msys2) TESTS 34 93 17203200
338635356 zundamon F Sept. 14, 2025, 5:16 p.m. OK C++23 (GCC 14-64, msys2) TESTS 34 93 17203200
338651617 nileshm7757 F Sept. 14, 2025, 9:03 p.m. OK C++23 (GCC 14-64, msys2) TESTS 34 108 4710400
338627243 shepherdtoherd F Sept. 14, 2025, 3:54 p.m. OK C++23 (GCC 14-64, msys2) TESTS 34 108 4710400
338614164 bestprogrammer_no1 F Sept. 14, 2025, 2:03 p.m. OK C++23 (GCC 14-64, msys2) TESTS 34 108 4710400
338663525 ICPCCode F Sept. 15, 2025, 3:07 a.m. OK GNU C11 TESTS 34 1624 9216000
338609171 Pavan__ F Sept. 14, 2025, 1:24 p.m. OK Java 21 TESTS 34 546 15564800
338606891 BurnerAce07 F Sept. 14, 2025, 1:05 p.m. OK Java 21 TESTS 34 561 63283200
338581023 keshav_.agg F Sept. 14, 2025, 9:48 a.m. OK Java 21 TESTS 34 608 37273600
338588446 AKhacks F Sept. 14, 2025, 10:50 a.m. OK Java 21 TESTS 34 609 39731200
338663086 oneafter F Sept. 15, 2025, 2:57 a.m. OK Java 21 TESTS 34 749 73523200
338634534 divesh0720 F Sept. 14, 2025, 5:08 p.m. OK Java 21 TESTS 34 936 32972800
338622687 ThorOfWebDev F Sept. 14, 2025, 3:15 p.m. OK Java 21 TESTS 34 1061 31948800
338580837 Ujjaval.mishra_7 F Sept. 14, 2025, 9:47 a.m. OK Java 21 TESTS 34 1187 5324800
338554821 kartikay_garg F Sept. 14, 2025, 4:35 a.m. OK Java 21 TESTS 34 1281 11161600
338630124 kasiru_69 F Sept. 14, 2025, 4:22 p.m. OK Java 8 TESTS 34 234 8806400
338621931 y_a_s F Sept. 14, 2025, 3:09 p.m. OK Java 8 TESTS 34 390 7987200
338626802 Hoang_Thien_De F Sept. 14, 2025, 3:50 p.m. OK Kotlin 1.9 TESTS 34 702 35123200
338604181 chinesedfan F Sept. 14, 2025, 12:44 p.m. OK Node.js TESTS 34 468 93388800
338592594 makimakimakki F Sept. 14, 2025, 11:21 a.m. OK PyPy 3 TESTS 34 1577 20172800
338541679 DarkTemplarDrop F Sept. 14, 2025, midnight OK PyPy 3-64 TESTS 34 218 30105600
338586529 heet070 F Sept. 14, 2025, 10:34 a.m. OK PyPy 3-64 TESTS 34 265 26316800
338638438 lynora_qwq F Sept. 14, 2025, 5:49 p.m. OK PyPy 3-64 TESTS 34 265 63488000
338646998 IcyGirl F Sept. 14, 2025, 7:38 p.m. OK PyPy 3-64 TESTS 34 281 42803200
338673599 smilences F Sept. 15, 2025, 5:22 a.m. OK PyPy 3-64 TESTS 34 296 32665600
338587967 ketuOP F Sept. 14, 2025, 10:47 a.m. OK PyPy 3-64 TESTS 34 296 44441600
338578408 DeadMan69 F Sept. 14, 2025, 9:28 a.m. OK PyPy 3-64 TESTS 34 343 51814400
338550984 Little_Sheep_Yawn F Sept. 14, 2025, 3:27 a.m. OK PyPy 3-64 TESTS 34 359 44134400
338624347 AAE F Sept. 14, 2025, 3:29 p.m. OK PyPy 3-64 TESTS 34 406 39526400
338606047 abhiratha F Sept. 14, 2025, 12:59 p.m. OK PyPy 3-64 TESTS 34 421 31436800
338555865 akarsh_jain05 F Sept. 14, 2025, 4:52 a.m. OK Python 3 TESTS 34 578 40448000
338674296 smilences F Sept. 15, 2025, 5:33 a.m. OK Python 3 TESTS 34 765 24883200
338657344 igobysani F Sept. 15, 2025, 12:26 a.m. OK Python 3 TESTS 34 780 85504000
338618982 KAMALASHKUMAARC F Sept. 14, 2025, 2:43 p.m. OK Python 3 TESTS 34 1077 172953600
338617295 davidmiheev F Sept. 14, 2025, 2:28 p.m. OK Python 3 TESTS 34 1093 23347200
338624189 mtz553395 F Sept. 14, 2025, 3:28 p.m. OK Python 3 TESTS 34 1327 26419200
338551426 Sin_R0str0 F Sept. 14, 2025, 3:36 a.m. OK Python 3 TESTS 34 1359 21299200
338537585 animeshsingh38 F Sept. 13, 2025, 10:17 p.m. OK Python 3 TESTS 34 1483 29388800
338658658 esrever F Sept. 15, 2025, 1:07 a.m. OK Rust 2021 TESTS 34 124 16179200

remove filters

Back to search problems