Pinely Round 3 (Div. 1 + 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
1909 Pinely Round 3 (Div. 1 + Div. 2) FINISHED False 10800 28481099 Dec. 23, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 11316 ) C Heavy Intervals PROGRAMMING constructive algorithms data structures ds greedy math sortings

B"You have n intervals [l_1, r_1], [l_2, r_2], ... , [l_n, r_n] , such that l_i < r_i for each i , and all the endpoints of the intervals are distinct. The i -th interval has weight c_i per unit length. Therefore, the weight of the i -th interval is c_i cdot (r_i - l_i) . You don't like large weights, so you want to make the sum of weights of the intervals as small as possible. It turns out you can perform all the following three operations: However, after performing all of the operations, the intervals must still be valid (i.e., for each i , l_i < r_i must hold). What's the minimum possible sum of weights of the intervals after performing the operations? Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 10^4 ). The description of the test cases follows. The first line of each test case contains a single integer n ( 1 <= n <= 10^5 ) -- the number of intervals. The second line of each test case contains n integers l_1, l_2, ldots, l_n ( 1 <= l_i <= 2 cdot 10^5 ) -- the left endpoints of the initial intervals. The third line of each test case contains n integers r_1, r_2, ldots, r_n ( l_i < r_i <= 2 cdot 10^5 ) -- the right endpoints of the initial intervals. It is guaranteed that {l_1, l_2, ... , l_n, r_1, r_2, ... , r_n } are all distinct. The fourth line of each test case contains n integers c_1, c_2, ldots, c_n ( 1 <= c_i <= 10^7 ) -- the initial weights of the intervals per unit length. It is guaranteed that the sum of n over all test cases does not exceed 10^5 . For each test case, output a single integer: the minimum possible sum of weights of the intervals after your operations. In the first test case, you can make In that case, there are two intervals: The sum of the weights is 2400 . It can be shown that there is no configuratio"...

Tutorials

Editorial of Pinely Round 3 (Div. 1 + Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
238597213 Gassa C Dec. 23, 2023, 7:16 p.m. OK D TESTS 8 265 27955200
238600184 NenadDapic C Dec. 23, 2023, 7:56 p.m. OK FPC TESTS 8 109 3072000
238578637 NenadDapic C Dec. 23, 2023, 5:03 p.m. OK FPC TESTS 8 124 5836800
238620577 Boimet C Dec. 24, 2023, 4:36 a.m. OK GNU C++14 TESTS 8 93 3993600
238589731 nickoless C Dec. 23, 2023, 6:12 p.m. OK GNU C++14 TESTS 8 93 3993600
238611324 yhy001 C Dec. 24, 2023, 12:48 a.m. OK GNU C++14 TESTS 8 93 5427200
238610597 -LAP- C Dec. 24, 2023, 12:15 a.m. OK GNU C++14 TESTS 8 93 5632000
238585837 ybarjatya20 C Dec. 23, 2023, 5:30 p.m. OK GNU C++14 TESTS 8 93 6553600
238619645 Konggee. C Dec. 24, 2023, 4:18 a.m. OK GNU C++14 TESTS 8 108 6656000
238619348 Konggee. C Dec. 24, 2023, 4:13 a.m. OK GNU C++14 TESTS 8 108 6656000
238616592 zrj66 C Dec. 24, 2023, 3:18 a.m. OK GNU C++14 TESTS 8 108 56524800
238619967 xinhuo C Dec. 24, 2023, 4:25 a.m. OK GNU C++14 TESTS 8 109 4505600
238613692 FDpencil3 C Dec. 24, 2023, 2:09 a.m. OK GNU C++14 TESTS 8 109 4915200
238623233 lyt_cg C Dec. 24, 2023, 5:18 a.m. OK GNU C++17 TESTS 8 93 3686400
238590675 solomonabate18 C Dec. 23, 2023, 6:17 p.m. OK GNU C++17 TESTS 8 93 4096000
238593220 vikky04 C Dec. 23, 2023, 6:35 p.m. OK GNU C++17 TESTS 8 93 4812800
238617761 kongcheng_lige C Dec. 24, 2023, 3:44 a.m. OK GNU C++17 TESTS 8 93 4915200
238577718 _MIND_CONTROL_ C Dec. 23, 2023, 5 p.m. OK GNU C++17 TESTS 8 93 5939200
238605501 cs142857 C Dec. 23, 2023, 9:28 p.m. OK GNU C++17 TESTS 8 93 6041600
238601450 shivamkr05bb9 C Dec. 23, 2023, 8:16 p.m. OK GNU C++17 TESTS 8 93 6348800
238578792 serenemind C Dec. 23, 2023, 5:04 p.m. OK GNU C++17 TESTS 8 108 3481600
238618767 rezaSetayesh C Dec. 24, 2023, 4:02 a.m. OK GNU C++17 TESTS 8 108 5120000
238608525 -is-this-fft- C Dec. 23, 2023, 10:52 p.m. OK GNU C++17 TESTS 8 108 5939200
238611792 qiyian C Dec. 24, 2023, 1:08 a.m. OK GNU C++17 (64) TESTS 8 62 4198400
238618496 Dynamic_Pigeon C Dec. 24, 2023, 3:57 a.m. OK GNU C++17 (64) TESTS 8 62 4710400
238609082 enslaved C Dec. 23, 2023, 11:11 p.m. OK GNU C++17 (64) TESTS 8 62 5120000
238612634 nitinbisht.291 C Dec. 24, 2023, 1:37 a.m. OK GNU C++17 (64) TESTS 8 62 6860800
238617970 Mys0ul C Dec. 24, 2023, 3:48 a.m. OK GNU C++17 (64) TESTS 8 62 9420800
238615148 cylyyds123 C Dec. 24, 2023, 2:44 a.m. OK GNU C++17 (64) TESTS 8 62 29491200
238604955 xiaossr C Dec. 23, 2023, 9:17 p.m. OK GNU C++17 (64) TESTS 8 77 4812800
238580577 daud04 C Dec. 23, 2023, 5:11 p.m. OK GNU C++17 (64) TESTS 8 77 5836800
238613840 fs20091003 C Dec. 24, 2023, 2:13 a.m. OK GNU C++17 (64) TESTS 8 77 6860800
238615739 _etou133 C Dec. 24, 2023, 2:58 a.m. OK GNU C++17 (64) TESTS 8 77 7065600
238606064 mrggrm C Dec. 23, 2023, 9:41 p.m. OK GNU C++20 (64) TESTS 8 31 13926400
238579715 Nahidameow C Dec. 23, 2023, 5:07 p.m. OK GNU C++20 (64) TESTS 8 46 11161600
238606376 mrggrm C Dec. 23, 2023, 9:48 p.m. OK GNU C++20 (64) TESTS 8 46 13926400
238606350 mrggrm C Dec. 23, 2023, 9:48 p.m. OK GNU C++20 (64) TESTS 8 46 13926400
238606325 mrggrm C Dec. 23, 2023, 9:47 p.m. OK GNU C++20 (64) TESTS 8 46 13926400
238605994 mrggrm C Dec. 23, 2023, 9:40 p.m. OK GNU C++20 (64) TESTS 8 46 13926400
238580262 Haneochi C Dec. 23, 2023, 5:09 p.m. OK GNU C++20 (64) TESTS 8 46 16998400
238605962 mrggrm C Dec. 23, 2023, 9:39 p.m. OK GNU C++20 (64) TESTS 8 46 42803200
238605905 mrggrm C Dec. 23, 2023, 9:38 p.m. OK GNU C++20 (64) TESTS 8 46 42803200
238605868 mrggrm C Dec. 23, 2023, 9:37 p.m. OK GNU C++20 (64) TESTS 8 46 42803200
238614071 SadFriedRice C Dec. 24, 2023, 2:19 a.m. OK Go TESTS 8 218 33587200
238581087 BurnerAce C Dec. 23, 2023, 5:13 p.m. OK Java 11 TESTS 8 436 37171200
238603308 PlayDate C Dec. 23, 2023, 8:47 p.m. OK Java 11 TESTS 8 451 37171200
238586146 Pranav_Sharda C Dec. 23, 2023, 5:31 p.m. OK Java 11 TESTS 8 530 41164800
238617904 wzp1239207892 C Dec. 24, 2023, 3:47 a.m. OK Java 11 TESTS 8 826 31129600
238603377 PlayDate C Dec. 23, 2023, 8:48 p.m. OK Java 11 TESTS 8 888 36147200
238581736 harshptank2212 C Dec. 23, 2023, 5:15 p.m. OK Java 17 TESTS 8 280 43110400
238621851 Liiii C Dec. 24, 2023, 4:58 a.m. OK Java 17 TESTS 8 327 42291200
238591520 mohammed.rabii C Dec. 23, 2023, 6:22 p.m. OK Java 17 TESTS 8 420 48537600
238612688 newbornLingling0423 C Dec. 24, 2023, 1:39 a.m. OK Java 21 TESTS 8 374 49152000
238609119 MrSharpedge C Dec. 23, 2023, 11:13 p.m. OK Java 21 TESTS 8 405 52633600
238619342 nazimazhaan17 C Dec. 24, 2023, 4:13 a.m. OK Java 21 TESTS 8 483 54067200
238578985 susvant C Dec. 23, 2023, 5:05 p.m. OK Java 21 TESTS 8 514 51814400
238584854 Samyajit125 C Dec. 23, 2023, 5:27 p.m. OK Java 21 TESTS 8 608 52531200
238579144 man-ray C Dec. 23, 2023, 5:05 p.m. OK Java 21 TESTS 8 654 47820800
238594602 Nirvanaa C Dec. 23, 2023, 6:47 p.m. OK Java 8 TESTS 8 342 32665600
238600222 Danger_Don C Dec. 23, 2023, 7:56 p.m. OK Java 8 TESTS 8 358 31539200
238581626 SparkX C Dec. 23, 2023, 5:15 p.m. OK Java 8 TESTS 8 390 37785600
238590087 American_Eagle C Dec. 23, 2023, 6:13 p.m. OK Java 8 TESTS 8 451 38297600
238590943 jvatsal0709 C Dec. 23, 2023, 6:19 p.m. OK PyPy 3 TESTS 8 966 35430400
238594454 belyak_anya C Dec. 23, 2023, 6:46 p.m. OK PyPy 3 TESTS 8 967 35430400
238597013 SamuelTull C Dec. 23, 2023, 7:14 p.m. OK PyPy 3-64 TESTS 8 171 53452800
238590927 vedantmishra69 C Dec. 23, 2023, 6:19 p.m. OK PyPy 3-64 TESTS 8 202 58368000
238582444 yhkee0404 C Dec. 23, 2023, 5:18 p.m. OK PyPy 3-64 TESTS 8 217 52326400
238578641 the_last_smilodon C Dec. 23, 2023, 5:03 p.m. OK PyPy 3-64 TESTS 8 234 56832000
238604716 skrabik C Dec. 23, 2023, 9:12 p.m. OK PyPy 3-64 TESTS 8 265 54886400
238589794 smdbs C Dec. 23, 2023, 6:12 p.m. OK PyPy 3-64 TESTS 8 311 55091200
238608632 RobinFromTheHood C Dec. 23, 2023, 10:55 p.m. OK PyPy 3-64 TESTS 8 389 50892800
238600512 hunglomdom C Dec. 23, 2023, 8:01 p.m. OK PyPy 3-64 TESTS 8 483 54272000
238609177 TychoElling C Dec. 23, 2023, 11:15 p.m. OK PyPy 3-64 TESTS 8 498 49766400
238602919 AAE C Dec. 23, 2023, 8:40 p.m. OK PyPy 3-64 TESTS 8 530 56217600
238623982 Ishan-Codeforces C Dec. 24, 2023, 5:28 a.m. OK Python 3 TESTS 8 358 28364800
238621850 BEAST-56 C Dec. 24, 2023, 4:58 a.m. OK Python 3 TESTS 8 436 40960000
238581141 rsg2100090066 C Dec. 23, 2023, 5:13 p.m. OK Python 3 TESTS 8 436 40960000
238594802 DrCoder9146 C Dec. 23, 2023, 6:49 p.m. OK Python 3 TESTS 8 467 43622400
238585790 AttilaRoshani C Dec. 23, 2023, 5:30 p.m. OK Python 3 TESTS 8 483 40960000
238582223 sbjunaid14 C Dec. 23, 2023, 5:17 p.m. OK Python 3 TESTS 8 483 40960000
238593051 SauravTheChamp C Dec. 23, 2023, 6:33 p.m. OK Python 3 TESTS 8 530 44851200
238580575 vlk0 C Dec. 23, 2023, 5:11 p.m. OK Python 3 TESTS 8 857 48947200
238592298 manish243 C Dec. 23, 2023, 6:27 p.m. OK Python 3 TESTS 8 904 44236800
238591258 liut C Dec. 23, 2023, 6:20 p.m. OK Rust 2021 TESTS 8 93 10956800
238580064 akkhr C Dec. 23, 2023, 5:09 p.m. OK Rust 2021 TESTS 8 109 12800000
238606424 vstiff C Dec. 23, 2023, 9:50 p.m. OK Rust 2021 TESTS 8 124 11366400

remove filters

Back to search problems