Codeforces Round 715 (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
1509 Codeforces Round 715 (Div. 2) FINISHED False 8100 118769111 April 16, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 13014 ) C The Sports Festival PROGRAMMING dp greedy

B'The student council is preparing for the relay race at the sports festival. The council consists of n members. They will run one after the other in the race, the speed of member i is s_i . The discrepancy d_i of the i -th stage is the difference between the maximum and the minimum running speed among the first i members who ran. Formally, if a_i denotes the speed of the i -th member who participated in the race, then d_i = max(a_1, a_2, ... , a_i) - min(a_1, a_2, ... , a_i) . You want to minimize the sum of the discrepancies d_1 + d_2 + ... + d_n . To do this, you are allowed to change the order in which the members run. What is the minimum possible sum that can be achieved? The first line contains a single integer n ( 1 <= n <= 2000 ) -- the number of members of the student council. The second line contains n integers s_1, s_2, ... , s_n ( 1 <= s_i <= 10^9 ) xe2 x80 x93 the running speeds of the members. Print a single integer -- the minimum possible value of d_1 + d_2 + ... + d_n after choosing the order of the members. In the first test case, we may choose to make the third member run first, followed by the first member, and finally the second. Thus a_1 = 2 , a_2 = 3 , and a_3 = 1 . We have: The resulting sum is d_1 + d_2 + d_3 = 0 + 1 + 2 = 3 . It can be shown that it is impossible to achieve a smaller value. In the second test case, the only possible rearrangement gives d_1 = 0 , so the minimum possible result is 0 . '...

Tutorials

Codeforces Round #715 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
113262834 ruban C April 16, 2021, 5:53 p.m. OK Delphi TESTS 21 61 146636800
113278344 zeust C April 16, 2021, 10:19 p.m. OK GNU C11 TESTS 21 31 0
113282098 rainboy C April 17, 2021, 12:37 a.m. OK GNU C11 TESTS 21 46 32051200
113286249 nddg711 C April 17, 2021, 2:48 a.m. OK GNU C11 TESTS 21 46 32256000
113267284 ankit7011 C April 16, 2021, 6:48 p.m. OK GNU C++11 TESTS 21 31 102400
113255642 MohammadAghil C April 16, 2021, 4:47 p.m. OK GNU C++11 TESTS 21 31 102400
113288642 Andy2009 C April 17, 2021, 3:38 a.m. OK GNU C++11 TESTS 21 31 102400
113266811 Darko1227 C April 16, 2021, 6:41 p.m. OK GNU C++11 TESTS 21 31 32051200
113251611 Rising_Date C April 16, 2021, 4:37 p.m. OK GNU C++11 TESTS 21 31 32051200
113249778 qingyuforever C April 16, 2021, 4:31 p.m. OK GNU C++11 TESTS 21 31 32153600
113286029 Social_Zhao C April 17, 2021, 2:43 a.m. OK GNU C++11 TESTS 21 31 32256000
113285186 Love_Jacques C April 17, 2021, 2:21 a.m. OK GNU C++11 TESTS 21 31 32256000
113289095 xtzic C April 17, 2021, 3:47 a.m. OK GNU C++11 TESTS 21 31 32256000
113285986 Suny_ C April 17, 2021, 2:42 a.m. OK GNU C++11 TESTS 21 31 32256000
113268227 sirius08 C April 16, 2021, 7:03 p.m. OK GNU C++14 TESTS 21 31 0
113252126 cainiaoqiujiao C April 16, 2021, 4:38 p.m. OK GNU C++14 TESTS 21 31 32256000
113252273 itachi0713 C April 16, 2021, 4:39 p.m. OK GNU C++14 TESTS 21 31 32358400
113263096 KoftaIQ C April 16, 2021, 5:56 p.m. OK GNU C++14 TESTS 21 31 35328000
113286408 skilledNoob C April 17, 2021, 2:52 a.m. OK GNU C++14 TESTS 21 31 72192000
113289555 love_for_maths C April 17, 2021, 3:56 a.m. OK GNU C++14 TESTS 21 46 102400
113293405 anishagarwal20 C April 17, 2021, 5:07 a.m. OK GNU C++14 TESTS 21 46 32051200
113290213 one_vision C April 17, 2021, 4:09 a.m. OK GNU C++14 TESTS 21 46 32051200
113297172 iwannabeigm C April 17, 2021, 5:58 a.m. OK GNU C++14 TESTS 21 46 32051200
113294575 code_breaker21 C April 17, 2021, 5:24 a.m. OK GNU C++14 TESTS 21 46 32051200
113284531 Hien C April 17, 2021, 2:02 a.m. OK GNU C++17 TESTS 21 15 32358400
113249044 highjump C April 16, 2021, 4:29 p.m. OK GNU C++17 TESTS 21 30 102400
113269592 YugiHacker C April 16, 2021, 7:23 p.m. OK GNU C++17 TESTS 21 30 32153600
113256818 EasonCookie197 C April 16, 2021, 4:49 p.m. OK GNU C++17 TESTS 21 30 32460800
113268383 prottoyfuad C April 16, 2021, 7:05 p.m. OK GNU C++17 TESTS 21 31 0
113266601 michaelmauricengn C April 16, 2021, 6:38 p.m. OK GNU C++17 TESTS 21 31 0
113293203 simply_hooman C April 17, 2021, 5:04 a.m. OK GNU C++17 TESTS 21 31 0
113291685 _Al_Amin C April 17, 2021, 4:36 a.m. OK GNU C++17 TESTS 21 31 0
113270305 -pandey_shivam- C April 16, 2021, 7:34 p.m. OK GNU C++17 TESTS 21 31 0
113267841 4d4rsh C April 16, 2021, 6:56 p.m. OK GNU C++17 TESTS 21 31 0
113283373 Murabito-B C April 17, 2021, 1:25 a.m. OK GNU C++17 (64) TESTS 21 15 102400
113261753 ecnerwala C April 16, 2021, 5:42 p.m. OK GNU C++17 (64) TESTS 21 31 0
113266414 mysteri0us7 C April 16, 2021, 6:35 p.m. OK GNU C++17 (64) TESTS 21 31 0
113273107 indrajitsadhukhan C April 16, 2021, 8:19 p.m. OK GNU C++17 (64) TESTS 21 31 24268800
113252288 morty C April 16, 2021, 4:39 p.m. OK GNU C++17 (64) TESTS 21 31 32153600
113250126 Amigos20 C April 16, 2021, 4:32 p.m. OK GNU C++17 (64) TESTS 21 31 32153600
113281840 TosakaUCW C April 17, 2021, 12:26 a.m. OK GNU C++17 (64) TESTS 21 31 32153600
113266040 xjzsq_ C April 16, 2021, 6:30 p.m. OK GNU C++17 (64) TESTS 21 31 32153600
113258661 Platypus05 C April 16, 2021, 5:17 p.m. OK GNU C++17 (64) TESTS 21 31 32153600
113275915 smith_orz C April 16, 2021, 9:11 p.m. OK GNU C++17 (64) TESTS 21 31 32256000
113250770 fadhilmusaad C April 16, 2021, 4:34 p.m. OK Go TESTS 21 109 32460800
113276550 jaynils C April 16, 2021, 9:27 p.m. OK Java 11 TESTS 21 233 39219200
113295279 WenboTT C April 17, 2021, 5:34 a.m. OK Java 11 TESTS 21 249 39526400
113275104 Andwerp C April 16, 2021, 8:54 p.m. OK Java 11 TESTS 21 249 40038400
113288008 dakshkamboj C April 17, 2021, 3:26 a.m. OK Java 11 TESTS 21 249 40038400
113292092 tushar_patil C April 17, 2021, 4:44 a.m. OK Java 11 TESTS 21 249 40140800
113275352 pravin_as C April 16, 2021, 8:59 p.m. OK Java 11 TESTS 21 264 39424000
113257955 ypa C April 16, 2021, 5:13 p.m. OK Java 11 TESTS 21 264 40038400
113285853 Ishwar_749 C April 17, 2021, 2:38 a.m. OK Java 11 TESTS 21 264 40345600
113291016 pirangitharun2000 C April 17, 2021, 4:25 a.m. OK Java 11 TESTS 21 264 40652800
113295302 shivamnarware C April 17, 2021, 5:34 a.m. OK Java 11 TESTS 21 265 40038400
113264768 gagan_6730 C April 16, 2021, 6:14 p.m. OK Java 8 TESTS 21 140 0
113262092 gssakash C April 16, 2021, 5:45 p.m. OK Java 8 TESTS 21 140 38195200
113296362 ankurverma1994 C April 17, 2021, 5:48 a.m. OK Java 8 TESTS 21 140 39219200
113291135 Extends C April 17, 2021, 4:27 a.m. OK Java 8 TESTS 21 155 38707200
113269437 akshaygupta26 C April 16, 2021, 7:21 p.m. OK Java 8 TESTS 21 155 39014400
113272771 tarun_sm C April 16, 2021, 8:13 p.m. OK Java 8 TESTS 21 156 39116800
113279175 TheSawan C April 16, 2021, 10:46 p.m. OK Java 8 TESTS 21 170 39219200
113273727 honeysingh18 C April 16, 2021, 8:28 p.m. OK Java 8 TESTS 21 171 38092800
113266478 Vishal_dhanani C April 16, 2021, 6:36 p.m. OK Java 8 TESTS 21 171 38297600
113283495 vaibhav7 C April 17, 2021, 1:28 a.m. OK Java 8 TESTS 21 171 38297600
113258002 ryo_n C April 16, 2021, 5:13 p.m. OK Kotlin TESTS 21 545 69222400
113268467 areniis C April 16, 2021, 7:06 p.m. OK Kotlin TESTS 21 638 83456000
113251079 FLself C April 16, 2021, 4:35 p.m. OK MS C++ 2017 TESTS 21 31 307200
113275323 Ilyaiq300 C April 16, 2021, 8:58 p.m. OK MS C++ 2017 TESTS 21 46 32256000
113287341 XieJiaXuan C April 17, 2021, 3:11 a.m. OK MS C++ 2017 TESTS 21 46 32665600
113287451 XieJiaXuan C April 17, 2021, 3:14 a.m. OK MS C++ 2017 TESTS 21 46 32665600
113291924 bh27122000 C April 17, 2021, 4:41 a.m. OK MS C++ 2017 TESTS 21 61 32153600
113277747 lethan3 C April 16, 2021, 10 p.m. OK MS C++ 2017 TESTS 21 62 32460800
113287417 XieJiaXuan C April 17, 2021, 3:13 a.m. OK MS C++ 2017 TESTS 21 62 32665600
113286934 XieJiaXuan C April 17, 2021, 3:03 a.m. OK MS C++ 2017 TESTS 21 62 32665600
113293498 saratcsss C April 17, 2021, 5:08 a.m. OK .NET Core C# TESTS 21 109 32358400
113288337 chrisfcoder C April 17, 2021, 3:32 a.m. OK .NET Core C# TESTS 21 109 35532800
113284858 mban259 C April 17, 2021, 2:12 a.m. OK .NET Core C# TESTS 21 124 35532800
113279786 CLown1331 C April 16, 2021, 11:06 p.m. OK .NET Core C# TESTS 21 140 36352000
113259192 CLown1331 C April 16, 2021, 5:20 p.m. OK .NET Core C# TESTS 21 187 36147200
113267526 tennisru C April 16, 2021, 6:51 p.m. OK Node.js TESTS 21 218 51916800
113266255 hxu10 C April 16, 2021, 6:33 p.m. OK PyPy 2 TESTS 21 264 9523200
113276076 Gaurav1 C April 16, 2021, 9:15 p.m. OK PyPy 2 TESTS 21 779 145100800
113260252 sushmanth.dampur8780 C April 16, 2021, 5:28 p.m. OK PyPy 3 TESTS 21 233 9318400
113296348 ZoeCUR C April 17, 2021, 5:48 a.m. OK PyPy 3 TESTS 21 249 9113600
113260463 sushmanth.dampur8780 C April 16, 2021, 5:30 p.m. OK PyPy 3 TESTS 21 249 9318400
113275640 denny_sem C April 16, 2021, 9:05 p.m. OK PyPy 3 TESTS 21 249 9318400
113260412 sushmanth.dampur8780 C April 16, 2021, 5:30 p.m. OK PyPy 3 TESTS 21 249 9318400
113259251 Genius3435 C April 16, 2021, 5:21 p.m. OK PyPy 3 TESTS 21 249 9318400
113295741 Mukesh003 C April 17, 2021, 5:40 a.m. OK PyPy 3 TESTS 21 264 9216000
113278308 patron666 C April 16, 2021, 10:18 p.m. OK PyPy 3 TESTS 21 264 9318400
113275293 Munchy_1 C April 16, 2021, 8:58 p.m. OK PyPy 3 TESTS 21 264 9318400
113269339 vitrag09 C April 16, 2021, 7:19 p.m. OK PyPy 3 TESTS 21 264 9318400
113270567 ssvb C April 16, 2021, 7:39 p.m. OK Ruby 3 TESTS 21 967 110796800
113250714 ryo_n C April 16, 2021, 4:34 p.m. OK Rust TESTS 21 61 32256000
113264044 GraphTheory C April 16, 2021, 6:06 p.m. OK Rust TESTS 21 62 32153600

remove filters

Back to search problems