Codeforces Round 592 (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
1244 Codeforces Round 592 (Div. 2) FINISHED False 7200 160865699 Oct. 13, 2019, 9:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5242 ) E Minimizing Difference PROGRAMMING binary search constructive algorithms greedy sortings ternary search two pointers 2000

B"You are given a sequence a_1, a_2, ... , a_n consisting of n integers. You may perform the following operation on this sequence: choose any element and either increase or decrease it by one. Calculate the minimum possible difference between the maximum element and the minimum element in the sequence, if you can perform the aforementioned operation no more than k times. The first line contains two integers n and k (2 <= n <= 10^{5}, 1 <= k <= 10^{14}) -- the number of elements in the sequence and the maximum number of times you can perform the operation, respectively. The second line contains a sequence of integers a_1, a_2, ... , a_n (1 <= a_i <= 10^{9}) . Print the minimum possible difference between the maximum element and the minimum element in the sequence, if you can perform the aforementioned operation no more than k times. In the first example you can increase the first element twice and decrease the third element twice, so the sequence becomes [3, 3, 5, 5] , and the difference between maximum and minimum is 2 . You still can perform one operation after that, but it's useless since you can't make the answer less than 2 . In the second example all elements are already equal, so you may get 0 as the answer even without applying any operations. "...

Tutorials

Codeforces Round #592 (Div. 2) Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
62762559 Sen_cdfo E Oct. 17, 2019, 7:25 a.m. OK Clang++17 Diagnostics TESTS 86 623 1024000 2000
62536796 Antoine E Oct. 13, 2019, 11:28 p.m. OK Clang++17 Diagnostics TESTS 86 654 1024000 2000
62595479 quickers E Oct. 15, 2019, 1:22 a.m. OK Clang++17 Diagnostics TESTS 86 1731 8396800 2000
62772600 MRoy E Oct. 17, 2019, 10:47 a.m. OK GNU C11 TESTS 86 78 819200 2000
62615799 Fubuki E Oct. 15, 2019, 11:23 a.m. OK GNU C++11 TESTS 86 31 204800 2000
62571114 yzh666 E Oct. 14, 2019, 2:32 p.m. OK GNU C++11 TESTS 86 31 512000 2000
62569091 luogu_bot5 E Oct. 14, 2019, 1:59 p.m. OK GNU C++11 TESTS 86 31 819200 2000
62549745 luogu_bot2 E Oct. 14, 2019, 8:05 a.m. OK GNU C++11 TESTS 86 31 819200 2000
62948141 songhn233 E Oct. 19, 2019, 6:06 p.m. OK GNU C++11 TESTS 86 31 819200 2000
62601594 ljc E Oct. 15, 2019, 5:52 a.m. OK GNU C++11 TESTS 86 31 1228800 2000
62566876 ILoLy E Oct. 14, 2019, 1:27 p.m. OK GNU C++11 TESTS 86 31 24166400 2000
62549362 Eganrak E Oct. 14, 2019, 7:55 a.m. OK GNU C++11 TESTS 86 46 204800 2000
64724275 zinai_boboyang E Nov. 12, 2019, 5:47 a.m. OK GNU C++11 TESTS 86 46 409600 2000
64890813 2016wudi E Nov. 14, 2019, 2:39 p.m. OK GNU C++11 TESTS 86 46 409600 2000
62532293 PRT E Oct. 13, 2019, 7:58 p.m. OK GNU C++14 TESTS 86 46 409600 2000
62652564 Lezedary_sandwich E Oct. 15, 2019, 10:34 p.m. OK GNU C++14 TESTS 86 46 512000 2000
66410151 vjudge3 E Dec. 6, 2019, 3:02 p.m. OK GNU C++14 TESTS 86 46 819200 2000
62523321 Andreasyan E Oct. 13, 2019, 4:28 p.m. OK GNU C++14 TESTS 86 46 1024000 2000
62575339 parsa333111 E Oct. 14, 2019, 3:44 p.m. OK GNU C++14 TESTS 86 46 7987200 2000
67074979 rk42745417 E Dec. 17, 2019, 2:08 p.m. OK GNU C++14 TESTS 86 61 409600 2000
64313319 tjd229 E Nov. 5, 2019, 1:23 p.m. OK GNU C++14 TESTS 86 61 409600 2000
63644016 dev_cpp E Oct. 28, 2019, 9:02 a.m. OK GNU C++14 TESTS 86 61 409600 2000
69725067 aakk E Jan. 29, 2020, noon OK GNU C++14 TESTS 86 61 409600 2000
63061753 tanmay2625 E Oct. 21, 2019, 8:58 a.m. OK GNU C++14 TESTS 86 61 409600 2000
62556016 vjudge1 E Oct. 14, 2019, 10:34 a.m. OK GNU C++17 TESTS 86 46 409600 2000
63978029 Deadly_Brace E Nov. 1, 2019, 9:11 a.m. OK GNU C++17 TESTS 86 46 409600 2000
65423989 TareqMahmudHridoy E Nov. 20, 2019, 10:04 a.m. OK GNU C++17 TESTS 86 46 614400 2000
62969289 vjudge5 E Oct. 20, 2019, 6:15 a.m. OK GNU C++17 TESTS 86 46 819200 2000
64194068 Aphelios E Nov. 4, 2019, 8:57 a.m. OK GNU C++17 TESTS 86 46 819200 2000
63988784 hetp111 E Nov. 1, 2019, 12:33 p.m. OK GNU C++17 TESTS 86 46 819200 2000
62521089 MisterGu E Oct. 13, 2019, 3:47 p.m. OK GNU C++17 TESTS 86 46 819200 2000
63104359 ab.chou E Oct. 22, 2019, 3:29 a.m. OK GNU C++17 TESTS 86 46 1228800 2000
62902536 _HonEy E Oct. 19, 2019, 4:43 a.m. OK GNU C++17 TESTS 86 46 1638400 2000
62870801 vjudge2 E Oct. 18, 2019, 1:42 p.m. OK GNU C++17 TESTS 86 46 2355200 2000
62977122 mie0 E Oct. 20, 2019, 9 a.m. OK Go TESTS 86 78 4505600 2000
62543770 synapse E Oct. 14, 2019, 5:18 a.m. OK Go TESTS 86 124 0 2000
62679487 synapse E Oct. 16, 2019, 12:25 p.m. OK Go TESTS 86 124 0 2000
62543801 synapse E Oct. 14, 2019, 5:20 a.m. OK Go TESTS 86 124 0 2000
62578629 Dekedro E Oct. 14, 2019, 4:38 p.m. OK Go TESTS 86 124 5324800 2000
62671272 synapse E Oct. 16, 2019, 9:51 a.m. OK Go TESTS 86 139 0 2000
63873520 serafimkoo E Oct. 30, 2019, 6:14 p.m. OK Java 11 TESTS 86 264 0 2000
65555227 IslamTalipovTop E Nov. 22, 2019, 9:14 p.m. OK Java 11 TESTS 86 358 0 2000
66513114 KulikAlex E Dec. 8, 2019, 5:36 p.m. OK Java 11 TESTS 86 374 3072000 2000
65768725 potatmen E Nov. 26, 2019, 7:20 p.m. OK Java 11 TESTS 86 389 2662400 2000
62619194 A5SAS51N E Oct. 15, 2019, 12:21 p.m. OK Java 8 TESTS 86 140 0 2000
64755726 Nutella3000 E Nov. 12, 2019, 4:51 p.m. OK Java 8 TESTS 86 155 0 2000
62619020 A5SAS51N E Oct. 15, 2019, 12:18 p.m. OK Java 8 TESTS 86 155 0 2000
62561419 polyakoff E Oct. 14, 2019, 12:04 p.m. OK Java 8 TESTS 86 155 0 2000
62549174 yaoct E Oct. 14, 2019, 7:50 a.m. OK Java 8 TESTS 86 155 0 2000
62588729 YahiaSherif E Oct. 14, 2019, 7:57 p.m. OK Java 8 TESTS 86 155 10956800 2000
62895368 Ahmed_Hosssam E Oct. 18, 2019, 11:23 p.m. OK Java 8 TESTS 86 156 0 2000
62618565 A5SAS51N E Oct. 15, 2019, 12:10 p.m. OK Java 8 TESTS 86 156 0 2000
62588931 Anonymous E Oct. 14, 2019, 8:03 p.m. OK Java 8 TESTS 86 156 10240000 2000
62751701 egaeus E Oct. 17, 2019, 1:48 a.m. OK Java 8 TESTS 86 171 0 2000
62538700 Spheniscine E Oct. 14, 2019, 1:30 a.m. OK Kotlin TESTS 86 186 921600 2000
62539576 Spheniscine E Oct. 14, 2019, 2:18 a.m. OK Kotlin TESTS 86 187 921600 2000
62542432 Spheniscine E Oct. 14, 2019, 4:28 a.m. OK Kotlin TESTS 86 187 1024000 2000
62539705 Spheniscine E Oct. 14, 2019, 2:25 a.m. OK Kotlin TESTS 86 187 1024000 2000
62537727 Spheniscine E Oct. 14, 2019, 12:27 a.m. OK Kotlin TESTS 86 187 1024000 2000
62573131 vjudge2 E Oct. 14, 2019, 3:06 p.m. OK Kotlin TESTS 86 249 204800 2000
62584126 cidgeedeng E Oct. 14, 2019, 6:10 p.m. OK Kotlin TESTS 86 249 9420800 2000
62583890 vjudge3 E Oct. 14, 2019, 6:05 p.m. OK Kotlin TESTS 86 249 9523200 2000
62573938 hzk E Oct. 14, 2019, 3:19 p.m. OK Kotlin TESTS 86 265 204800 2000
65462623 tomomo2b2 E Nov. 21, 2019, 3:30 a.m. OK Mono C# TESTS 86 109 15974400 2000
62552752 omikad E Oct. 14, 2019, 9:21 a.m. OK Mono C# TESTS 86 124 18636800 2000
63527928 vjudge1 E Oct. 27, 2019, 5:50 a.m. OK MS C++ TESTS 86 46 409600 2000
63527983 vjudge4 E Oct. 27, 2019, 5:51 a.m. OK MS C++ TESTS 86 46 409600 2000
64318957 vjudge3 E Nov. 5, 2019, 2:59 p.m. OK MS C++ TESTS 86 46 409600 2000
62871009 vjudge2 E Oct. 18, 2019, 1:46 p.m. OK MS C++ TESTS 86 46 819200 2000
66406215 vjudge1 E Dec. 6, 2019, 1:46 p.m. OK MS C++ TESTS 86 46 819200 2000
63782330 vjudge1 E Oct. 30, 2019, 11:24 a.m. OK MS C++ TESTS 86 46 819200 2000
63235579 vjudge5 E Oct. 23, 2019, 12:11 p.m. OK MS C++ TESTS 86 46 819200 2000
62899363 vjudge4 E Oct. 19, 2019, 3:11 a.m. OK MS C++ TESTS 86 46 819200 2000
62897582 vjudge3 E Oct. 19, 2019, 1:47 a.m. OK MS C++ TESTS 86 46 819200 2000
62871018 vjudge1 E Oct. 18, 2019, 1:46 p.m. OK MS C++ TESTS 86 46 819200 2000
63013735 vjudge2 E Oct. 20, 2019, 12:20 p.m. OK MS C++ 2017 TESTS 86 61 819200 2000
64059124 csu-caiji E Nov. 2, 2019, 2:58 a.m. OK MS C++ 2017 TESTS 86 61 1843200 2000
62926895 vjudge1 E Oct. 19, 2019, 11:36 a.m. OK MS C++ 2017 TESTS 86 62 819200 2000
62899369 RONGER E Oct. 19, 2019, 3:11 a.m. OK MS C++ 2017 TESTS 86 62 819200 2000
63014763 vjudge4 E Oct. 20, 2019, 12:36 p.m. OK MS C++ 2017 TESTS 86 62 819200 2000
63356781 vjudge4 E Oct. 25, 2019, 3:10 a.m. OK MS C++ 2017 TESTS 86 62 819200 2000
62859552 ouyeye E Oct. 18, 2019, 10:22 a.m. OK MS C++ 2017 TESTS 86 62 2457600 2000
63123122 dream_dreamer E Oct. 22, 2019, 11:59 a.m. OK MS C++ 2017 TESTS 86 62 2457600 2000
62620311 taekop E Oct. 15, 2019, 12:40 p.m. OK MS C++ 2017 TESTS 86 93 15360000 2000
62520696 Prokopiy E Oct. 13, 2019, 3:41 p.m. OK MS C++ 2017 TESTS 86 124 921600 2000
62565898 alexwice E Oct. 14, 2019, 1:14 p.m. OK PyPy 2 TESTS 86 171 7680000 2000
62949974 YESMAths E Oct. 19, 2019, 6:33 p.m. OK PyPy 2 TESTS 86 171 7884800 2000
62548766 kabeer27 E Oct. 14, 2019, 7:39 a.m. OK PyPy 2 TESTS 86 202 8908800 2000
62601620 MVP E Oct. 15, 2019, 5:52 a.m. OK PyPy 2 TESTS 86 218 10547200 2000
62669399 SetsunaOgiso E Oct. 16, 2019, 9:09 a.m. OK PyPy 3 TESTS 86 187 10137600 2000
64046037 GhaziXX E Nov. 1, 2019, 7:28 p.m. OK PyPy 3 TESTS 86 249 10649600 2000
62522465 FireBird23 E Oct. 13, 2019, 4:12 p.m. OK PyPy 3 TESTS 86 249 11673600 2000
62525427 thekushalghosh E Oct. 13, 2019, 5:10 p.m. OK PyPy 3 TESTS 86 264 10240000 2000
67676461 tycyd E Dec. 27, 2019, 2:27 a.m. OK PyPy 3 TESTS 86 264 10752000 2000
62669002 SetsunaOgiso E Oct. 16, 2019, 9 a.m. OK PyPy 3 TESTS 86 264 11366400 2000
63608208 shiv1470 E Oct. 27, 2019, 4:02 p.m. OK PyPy 3 TESTS 86 264 11571200 2000
62644696 arp106 E Oct. 15, 2019, 7:10 p.m. OK PyPy 3 TESTS 86 264 11673600 2000
62609350 19n1900011773 E Oct. 15, 2019, 9:07 a.m. OK PyPy 3 TESTS 86 264 11776000 2000
64268144 r57shell E Nov. 4, 2019, 6:01 p.m. OK PyPy 3 TESTS 86 264 12800000 2000
62761539 xodeChemist E Oct. 17, 2019, 7:03 a.m. OK Python 3 TESTS 86 218 8499200 2000
66972915 sruthi_1729 E Dec. 15, 2019, 1:44 p.m. OK Python 3 TESTS 86 233 8806400 2000
64565549 MinecraftFuns E Nov. 9, 2019, 7:34 a.m. OK Python 3 TESTS 86 234 8396800 2000
64568544 MinecraftFuns E Nov. 9, 2019, 8:23 a.m. OK Python 3 TESTS 86 248 8396800 2000
64524309 MinecraftFuns E Nov. 8, 2019, 1:17 p.m. OK Python 3 TESTS 86 249 8396800 2000
62967756 vishnutheerthep E Oct. 20, 2019, 5:35 a.m. OK Python 3 TESTS 86 249 8396800 2000
64523395 MinecraftFuns E Nov. 8, 2019, 1:01 p.m. OK Python 3 TESTS 86 249 8499200 2000
63051738 franckmy E Oct. 21, 2019, 3:05 a.m. OK Python 3 TESTS 86 249 8499200 2000
62646692 ayushagarwal106 E Oct. 15, 2019, 7:48 p.m. OK Python 3 TESTS 86 249 8499200 2000
64117287 Aloha E Nov. 2, 2019, 9:35 p.m. OK Python 3 TESTS 86 280 8806400 2000
62957752 alleycat-at-git E Oct. 19, 2019, 9:29 p.m. OK Rust TESTS 86 46 2662400 2000
62601201 akiradeveloper E Oct. 15, 2019, 5:39 a.m. OK Rust TESTS 86 514 3481600 2000
62530308 limed E Oct. 13, 2019, 7:01 p.m. OK Scala TESTS 86 514 5120000 2000
65225560 gazaan E Nov. 17, 2019, 1:25 a.m. OK Scala TESTS 86 717 15564800 2000

remove filters

Back to search problems