Divide by Zero 2021 and Codeforces Round 714 (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
1513 Divide by Zero 2021 and Codeforces Round 714 (Div. 2) FINISHED False 7200 119114663 April 11, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1298 ) F Swapping Problem PROGRAMMING brute force constructive algorithms data structures sortings

B'You are given 2 arrays a and b , both of size n . You can swap two elements in b at most once (or leave it as it is), and you are required to minimize the value sum_{i}|a_{i}-b_{i}|. Find the minimum possible value of this sum. The first line contains a single integer n ( 1 <= n <= 2 cdot 10^5 ). The second line contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= {10^9} ). The third line contains n integers b_1, b_2, ldots, b_n ( 1 <= b_i <= {10^9} ). Output the minimum value of sum_{i}|a_{i}-b_{i}| . In the first example, we can swap the first and fifth element in array b , so that it becomes [ 5, 2, 3, 4, 1 ] . Therefore, the minimum possible value of this sum would be |5-5| + |4-2| + |3-3| + |2-4| + |1-1| = 4 . In the second example, we can swap the first and second elements. So, our answer would be 2 . '...

Tutorials

Divide by Zero 2021 and Codeforces Round #714 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
112733584 zech F April 12, 2021, 1:25 a.m. OK GNU C++11 TESTS 103 46 14438400
112714359 XueYJ F April 11, 2021, 5:28 p.m. OK GNU C++11 TESTS 103 124 3993600
112723373 aa2985759 F April 11, 2021, 7:30 p.m. OK GNU C++11 TESTS 103 218 8908800
112728139 xing89qs F April 11, 2021, 9:15 p.m. OK GNU C++11 TESTS 103 265 10444800
112733061 __23333 F April 12, 2021, 1:03 a.m. OK GNU C++11 TESTS 103 295 17612800
112715556 TranLeHiep F April 11, 2021, 5:40 p.m. OK GNU C++11 TESTS 103 343 18432000
112713378 TranLeHiep F April 11, 2021, 5:19 p.m. OK GNU C++11 TESTS 103 358 36864000
112741917 GVZ_Cai F April 12, 2021, 3:28 a.m. OK GNU C++11 TESTS 103 421 172544000
112706130 GavinZheng F April 11, 2021, 4:25 p.m. OK GNU C++11 TESTS 103 436 77414400
112739848 Bleotiu F April 12, 2021, 2:32 a.m. OK GNU C++11 TESTS 103 842 6860800
112704242 flowmaster F April 11, 2021, 4:19 p.m. OK GNU C++14 TESTS 103 139 5324800
112731899 SuperJ6 F April 12, 2021, 12:05 a.m. OK GNU C++14 TESTS 103 140 4096000
112712169 DMCS F April 11, 2021, 5:10 p.m. OK GNU C++14 TESTS 103 155 10649600
112714205 yash_daga F April 11, 2021, 5:26 p.m. OK GNU C++14 TESTS 103 202 15360000
112728640 HanTroid F April 11, 2021, 9:32 p.m. OK GNU C++14 TESTS 103 217 14028800
112728609 HanTroid F April 11, 2021, 9:30 p.m. OK GNU C++14 TESTS 103 217 14028800
112748539 farmerboy F April 12, 2021, 5:34 a.m. OK GNU C++14 TESTS 103 295 8192000
112708449 yuigahama_yui F April 11, 2021, 4:31 p.m. OK GNU C++14 TESTS 103 623 17612800
112705142 AwakeAnay F April 11, 2021, 4:22 p.m. OK GNU C++14 TESTS 103 733 4812800
112746082 StelaYuri F April 12, 2021, 4:53 a.m. OK GNU C++17 TESTS 103 140 4812800
112733379 KrK F April 12, 2021, 1:17 a.m. OK GNU C++17 TESTS 103 140 5324800
112732432 zhangminchen F April 12, 2021, 12:33 a.m. OK GNU C++17 TESTS 103 140 5324800
112708450 hank55663 F April 11, 2021, 4:31 p.m. OK GNU C++17 TESTS 103 155 6348800
112747494 DemonForces F April 12, 2021, 5:17 a.m. OK GNU C++17 TESTS 103 155 7987200
112732749 Zap F April 12, 2021, 12:49 a.m. OK GNU C++17 TESTS 103 156 8908800
112733065 ezfee F April 12, 2021, 1:03 a.m. OK GNU C++17 TESTS 103 171 9523200
112702852 gabrielwu F April 11, 2021, 4:15 p.m. OK GNU C++17 TESTS 103 171 12697600
112715319 RennGladars F April 11, 2021, 5:38 p.m. OK GNU C++17 TESTS 103 186 6963200
112732129 ezfee F April 12, 2021, 12:17 a.m. OK GNU C++17 TESTS 103 186 9523200
112743027 burnoutag F April 12, 2021, 3:52 a.m. OK GNU C++17 (64) TESTS 103 109 6656000
112705809 physics0523 F April 11, 2021, 4:24 p.m. OK GNU C++17 (64) TESTS 103 109 13107200
112731042 chctxdy68 F April 11, 2021, 11:19 p.m. OK GNU C++17 (64) TESTS 103 124 3174400
112739787 neal F April 12, 2021, 2:30 a.m. OK GNU C++17 (64) TESTS 103 124 11673600
112711113 wifiiii F April 11, 2021, 5:04 p.m. OK GNU C++17 (64) TESTS 103 155 4915200
112711720 trainwithoutpain F April 11, 2021, 5:07 p.m. OK GNU C++17 (64) TESTS 103 171 6451200
112746109 nnm_shiraha F April 12, 2021, 4:54 a.m. OK GNU C++17 (64) TESTS 103 171 6860800
112705069 Fly_37 F April 11, 2021, 4:22 p.m. OK GNU C++17 (64) TESTS 103 171 27852800
112714894 Rahul F April 11, 2021, 5:33 p.m. OK GNU C++17 (64) TESTS 103 186 7987200
112711197 Kude F April 11, 2021, 5:05 p.m. OK GNU C++17 (64) TESTS 103 202 15564800
112711722 Dukkha F April 11, 2021, 5:07 p.m. OK Java 11 TESTS 103 1075 6656000
112707153 YahiaSherif F April 11, 2021, 4:28 p.m. OK Java 8 TESTS 103 530 24985600
112703953 JrNTR F April 11, 2021, 4:18 p.m. OK Kotlin TESTS 103 1232 37273600
112711909 pichulia F April 11, 2021, 5:09 p.m. OK MS C++ 2017 TESTS 103 546 53452800
112712419 SPD_9X2 F April 11, 2021, 5:12 p.m. OK PyPy 3 TESTS 103 1715 34201600

remove filters

Back to search problems