Educational Codeforces Round 124 (Rated for 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
1651 Educational Codeforces Round 124 (Rated for Div. 2) FINISHED False 7200 90343463 March 10, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 10917 ) C Fault-tolerant Network PROGRAMMING brute force data structures implementation

B"There is a classroom with two rows of computers. There are n computers in each row and each computer has its own grade. Computers in the first row has grades a_1, a_2, ... , a_n and in the second row -- b_1, b_2, ... , b_n . Initially, all pairs of neighboring computers in each row are connected by wire (pairs (i, i + 1) for all 1 <= i < n ), so two rows form two independent computer networks. Your task is to combine them in one common network by connecting one or more pairs of computers from different rows. Connecting the i -th computer from the first row and the j -th computer from the second row costs |a_i - b_j| . You can connect one computer to several other computers, but you need to provide at least a basic fault tolerance: you need to connect computers in such a way that the network stays connected, despite one of its computer failing. In other words, if one computer is broken (no matter which one), the network won't split in two or more parts. That is the minimum total cost to make a fault-tolerant network? The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. Next t cases follow. The first line of each test case contains the single integer n ( 3 <= n <= 2 cdot 10^5 ) -- the number of computers in each row. The second line contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 10^9 ) -- the grades of computers in the first row. The third line contains n integers b_1, b_2, ... , b_n ( 1 <= b_i <= 10^9 ) -- the grades of computers in the second row. It's guaranteed that the total sum of n doesn't exceed 2 cdot 10^5 . For each test case, print a single integer -- the minimum total cost to make a fault-tolerant network. In the first test case, it's optimal to connect four pairs of computers: In the second test case, it's optimal to connect 1 from the first row with 1 "...

Tutorials

Educational Codeforces Round 124 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
149180183 Priyanshuiiitg C March 10, 2022, 5:54 p.m. OK GNU C11 TESTS 4 78 3174400
149201247 lyttr C March 11, 2022, 1:57 a.m. OK GNU C11 TESTS 4 93 3174400
149164761 lazychen C March 10, 2022, 4:25 p.m. OK GNU C11 TESTS 4 93 3174400
149204123 ypz C March 11, 2022, 3:04 a.m. OK GNU C++14 TESTS 4 46 5939200
149163111 closed_doors C March 10, 2022, 4:21 p.m. OK GNU C++14 TESTS 4 93 1536000
149199458 nufu_lt C March 11, 2022, 1:01 a.m. OK GNU C++14 TESTS 4 93 1638400
149200774 Shuai. C March 11, 2022, 1:43 a.m. OK GNU C++14 TESTS 4 93 1638400
149165848 yige_ C March 10, 2022, 4:28 p.m. OK GNU C++14 TESTS 4 93 1638400
149165845 whitesword C March 10, 2022, 4:28 p.m. OK GNU C++14 TESTS 4 93 1638400
149205535 Yuki991 C March 11, 2022, 3:33 a.m. OK GNU C++14 TESTS 4 93 1638400
149207444 Aurora. C March 11, 2022, 4:08 a.m. OK GNU C++14 TESTS 4 93 1638400
149171302 matusinha C March 10, 2022, 4:41 p.m. OK GNU C++14 TESTS 4 93 2662400
149169596 g906360 C March 10, 2022, 4:34 p.m. OK GNU C++14 TESTS 4 93 2662400
149177167 21xyu C March 10, 2022, 5:24 p.m. OK GNU C++17 TESTS 4 62 1536000
149169317 MihaiMocanu2 C March 10, 2022, 4:34 p.m. OK GNU C++17 TESTS 4 77 3174400
149177407 20bcs030 C March 10, 2022, 5:26 p.m. OK GNU C++17 TESTS 4 78 1638400
149165833 mhxtc C March 10, 2022, 4:28 p.m. OK GNU C++17 TESTS 4 78 3174400
149210044 NaveenKumar C March 11, 2022, 4:51 a.m. OK GNU C++17 TESTS 4 93 1638400
149203934 logh1 C March 11, 2022, 3:01 a.m. OK GNU C++17 TESTS 4 93 1638400
149201710 qwertyyuu C March 11, 2022, 2:09 a.m. OK GNU C++17 TESTS 4 93 1638400
149191988 ntoni_boss C March 10, 2022, 8:50 p.m. OK GNU C++17 TESTS 4 93 1638400
149210642 murarry C March 11, 2022, 5 a.m. OK GNU C++17 TESTS 4 93 1638400
149214328 Rookie2022 C March 11, 2022, 5:50 a.m. OK GNU C++17 TESTS 4 93 1638400
149182496 sun_rise C March 10, 2022, 6:20 p.m. OK GNU C++17 (64) TESTS 4 46 3174400
149172895 kai2211 C March 10, 2022, 4:51 p.m. OK GNU C++17 (64) TESTS 4 46 3174400
149192829 stevenkplus C March 10, 2022, 9:08 p.m. OK GNU C++17 (64) TESTS 4 61 2457600
149208077 yasserkhan45 C March 11, 2022, 4:19 a.m. OK GNU C++17 (64) TESTS 4 61 3174400
149211823 programmer765 C March 11, 2022, 5:16 a.m. OK GNU C++17 (64) TESTS 4 61 3174400
149207603 GreyMatter14 C March 11, 2022, 4:10 a.m. OK GNU C++17 (64) TESTS 4 61 3174400
149198654 kal013 C March 11, 2022, 12:35 a.m. OK GNU C++17 (64) TESTS 4 61 3174400
149191613 spartanes C March 10, 2022, 8:42 p.m. OK GNU C++17 (64) TESTS 4 61 3174400
149189931 bedirhan C March 10, 2022, 8:09 p.m. OK GNU C++17 (64) TESTS 4 61 3174400
149189761 Manhar_Bhardwaj C March 10, 2022, 8:07 p.m. OK GNU C++17 (64) TESTS 4 61 3174400
149176463 3mar_ahmed C March 10, 2022, 5:17 p.m. OK GNU C++20 (64) TESTS 4 31 3174400
149180119 jojonicho C March 10, 2022, 5:53 p.m. OK GNU C++20 (64) TESTS 4 46 1638400
149172552 surrepo C March 10, 2022, 4:49 p.m. OK GNU C++20 (64) TESTS 4 46 1638400
149171742 mehtaji C March 10, 2022, 4:44 p.m. OK GNU C++20 (64) TESTS 4 46 1638400
149169946 aryan1602 C March 10, 2022, 4:34 p.m. OK GNU C++20 (64) TESTS 4 46 1638400
149167034 1.618033 C March 10, 2022, 4:30 p.m. OK GNU C++20 (64) TESTS 4 46 1638400
149187925 b4nd1t C March 10, 2022, 7:36 p.m. OK GNU C++20 (64) TESTS 4 46 1638400
149203232 anyi777777 C March 11, 2022, 2:47 a.m. OK GNU C++20 (64) TESTS 4 46 1638400
149214262 Mutant_23 C March 11, 2022, 5:49 a.m. OK GNU C++20 (64) TESTS 4 46 3174400
149212230 Raj_Aditya C March 11, 2022, 5:22 a.m. OK GNU C++20 (64) TESTS 4 46 3174400
149197078 Satyaa C March 10, 2022, 11:34 p.m. OK Java 11 TESTS 4 170 0
149199173 decrease_mather C March 11, 2022, 12:53 a.m. OK Java 11 TESTS 4 186 0
149169876 humwawe C March 10, 2022, 4:34 p.m. OK Java 11 TESTS 4 186 0
149198367 Satyaa C March 11, 2022, 12:24 a.m. OK Java 11 TESTS 4 187 0
149211135 themadknight45 C March 11, 2022, 5:07 a.m. OK Java 11 TESTS 4 248 4915200
149211974 __Serendipity C March 11, 2022, 5:18 a.m. OK Java 11 TESTS 4 249 3891200
149176272 henrychenOutlook C March 10, 2022, 5:16 p.m. OK Java 11 TESTS 4 249 4096000
149180179 SaberXpro C March 10, 2022, 5:54 p.m. OK Java 11 TESTS 4 249 4505600
149212023 C4T4LYST C March 11, 2022, 5:19 a.m. OK Java 11 TESTS 4 249 4608000
149171060 LongWalk C March 10, 2022, 4:40 p.m. OK Java 11 TESTS 4 249 4710400
149210036 Sachin_2961 C March 11, 2022, 4:51 a.m. OK Java 8 TESTS 4 109 0
149174414 athu18 C March 10, 2022, 5:01 p.m. OK Java 8 TESTS 4 156 12902400
149165449 DWSHR C March 10, 2022, 4:27 p.m. OK Java 8 TESTS 4 186 16486400
149165007 Atuer C March 10, 2022, 4:26 p.m. OK Java 8 TESTS 4 187 17817600
149210963 tanishq044 C March 11, 2022, 5:04 a.m. OK Java 8 TESTS 4 202 12800000
149178179 sandy11jr C March 10, 2022, 5:32 p.m. OK Java 8 TESTS 4 218 14336000
149181111 akbar19 C March 10, 2022, 6:04 p.m. OK Java 8 TESTS 4 218 17305600
149171406 rajneesh.osho C March 10, 2022, 4:42 p.m. OK Java 8 TESTS 4 233 12902400
149163795 ericdai1 C March 10, 2022, 4:23 p.m. OK Java 8 TESTS 4 249 21299200
149201398 justinm_02 C March 11, 2022, 2:01 a.m. OK Java 8 TESTS 4 576 0
149187923 Jarekczek C March 10, 2022, 7:36 p.m. OK Kotlin 1.4 TESTS 4 639 1228800
149180017 tatianyi C March 10, 2022, 5:52 p.m. OK MS C++ 2017 TESTS 4 108 1638400
149199920 break_dream C March 11, 2022, 1:16 a.m. OK MS C++ 2017 TESTS 4 109 3174400
149165003 korpukhin03 C March 10, 2022, 4:26 p.m. OK MS C++ 2017 TESTS 4 280 3174400
149178556 0I_ILYA_I0 C March 10, 2022, 5:36 p.m. OK MS C++ 2017 TESTS 4 295 3174400
149171411 yur_ka C March 10, 2022, 4:42 p.m. OK MS C++ 2017 TESTS 4 295 3174400
149171815 _Mister_Doctor C March 10, 2022, 4:44 p.m. OK MS C++ 2017 TESTS 4 296 4812800
149211319 SWFan C March 11, 2022, 5:09 a.m. OK MS C++ 2017 TESTS 4 1060 3174400
149164276 scixing C March 10, 2022, 4:24 p.m. OK .NET Core C# TESTS 4 248 48435200
149189828 michael.g.pan C March 10, 2022, 8:08 p.m. OK PyPy 3 TESTS 4 342 22835200
149198498 majay1638 C March 11, 2022, 12:29 a.m. OK PyPy 3 TESTS 4 452 20480000
149172450 hxu10 C March 10, 2022, 4:48 p.m. OK PyPy 3 TESTS 4 467 27955200
149170767 ambs_ C March 10, 2022, 4:39 p.m. OK PyPy 3 TESTS 4 529 19968000
149198785 kuanc C March 11, 2022, 12:39 a.m. OK PyPy 3 TESTS 4 732 20992000
149207697 gkc_chaitu C March 11, 2022, 4:12 a.m. OK PyPy 3 TESTS 4 748 19763200
149207546 vivek3141 C March 11, 2022, 4:10 a.m. OK PyPy 3 TESTS 4 779 18944000
149176335 MistaAsh C March 10, 2022, 5:16 p.m. OK PyPy 3 TESTS 4 779 19353600
149207588 vivek3141 C March 11, 2022, 4:10 a.m. OK PyPy 3 TESTS 4 810 18944000
149168559 DaniilNemtsev C March 10, 2022, 4:33 p.m. OK PyPy 3 TESTS 4 826 21196800
149214831 raushnn C March 11, 2022, 5:57 a.m. OK PyPy 3-64 TESTS 4 311 39116800
149167763 yjgwak.cs C March 10, 2022, 4:31 p.m. OK PyPy 3-64 TESTS 4 327 45260800
149193952 m.ni C March 10, 2022, 9:37 p.m. OK PyPy 3-64 TESTS 4 436 29798400
149170499 Durumari C March 10, 2022, 4:38 p.m. OK PyPy 3-64 TESTS 4 436 30822400
149166501 only_for_kav_tripathi C March 10, 2022, 4:29 p.m. OK PyPy 3-64 TESTS 4 436 35225600
149205133 IkshitG C March 11, 2022, 3:24 a.m. OK PyPy 3-64 TESTS 4 483 33792000
149179280 Himanshu_Kaithal C March 10, 2022, 5:44 p.m. OK PyPy 3-64 TESTS 4 483 46080000
149203522 abhijeet.panihar.cse20 C March 11, 2022, 2:53 a.m. OK PyPy 3-64 TESTS 4 546 30515200
149193713 Lhohelhohehmm C March 10, 2022, 9:30 p.m. OK PyPy 3-64 TESTS 4 576 39116800
149214160 furmarie C March 11, 2022, 5:48 a.m. OK PyPy 3-64 TESTS 4 592 42803200
149174523 _Frust C March 10, 2022, 5:02 p.m. OK Python 3 TESTS 4 326 23654400
149178487 tahuruzzoha C March 10, 2022, 5:35 p.m. OK Python 3 TESTS 4 374 25702400
149183277 a_vantik_a C March 10, 2022, 6:29 p.m. OK Python 3 TESTS 4 389 24473600
149173609 CHVRCHES C March 10, 2022, 4:55 p.m. OK Python 3 TESTS 4 390 23347200
149175298 SKA1812 C March 10, 2022, 5:08 p.m. OK Python 3 TESTS 4 436 22732800
149183654 rohanmitra2420 C March 10, 2022, 6:34 p.m. OK Python 3 TESTS 4 483 22937600
149203512 abhijeet.panihar.cse20 C March 11, 2022, 2:52 a.m. OK Python 3 TESTS 4 514 23756800
149183244 a_vantik_a C March 10, 2022, 6:29 p.m. OK Python 3 TESTS 4 545 22732800
149180055 user100 C March 10, 2022, 5:52 p.m. OK Python 3 TESTS 4 545 22732800
149165142 mihir111p C March 10, 2022, 4:26 p.m. OK Python 3 TESTS 4 545 24064000

remove filters

Back to search problems