Codeforces Round 619 (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
1301 Codeforces Round 619 (Div. 2) FINISHED False 7200 150218699 Feb. 13, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 14317 ) B Motarack's Birthday PROGRAMMING binary search greedy ternary search 1500

B"Dark is going to attend Motarack's birthday. Dark decided that the gift he is going to give to Motarack is an array a of n non-negative integers. Dark created that array 1000 years ago, so some elements in that array disappeared. Dark knows that Motarack hates to see an array that has two adjacent elements with a high absolute difference between them. He doesn't have much time so he wants to choose an integer k ( 0 <= q k <= q 10^{9} ) and replaces all missing elements in the array a with k . Let m be the maximum absolute difference between all adjacent elements (i.e. the maximum value of |a_i - a_{i+1}| for all 1 <= q i <= q n - 1 ) in the array a after Dark replaces all missing elements with k . Dark should choose an integer k so that m is minimized. Can you help him? The input consists of multiple test cases. The first line contains a single integer t ( 1 <= q t <= q 10^4 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains one integer n ( 2 <= q n <= q 10^{5} ) -- the size of the array a . The second line of each test case contains n integers a_1, a_2, ldots, a_n ( -1 <= q a_i <= q 10 ^ {9} ). If a_i = -1 , then the i -th integer is missing. It is guaranteed that at least one integer is missing in every test case. It is guaranteed, that the sum of n for all test cases does not exceed 4 cdot 10 ^ {5} . Print the answers for each test case in the following format: You should print two integers, the minimum possible value of m and an integer k ( 0 <= q k <= q 10^{9} ) that makes the maximum absolute difference between adjacent elements in the array a equal to m . Make sure that after replacing all the missing elements with k , the maximum absolute difference between adjacent elements becomes m . If there is more"...

Tutorials

Codeforces Round #619 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
71092355 iLovePKU_zbtxdy B Feb. 15, 2020, 2:40 a.m. OK Clang++17 Diagnostics TESTS 64 1887 4505600 1500
70972119 daut-dlang B Feb. 13, 2020, 2:54 p.m. OK D TESTS 64 124 11571200 1500
70972146 iica B Feb. 13, 2020, 2:54 p.m. OK D TESTS 64 124 11673600 1500
70976547 ruban B Feb. 13, 2020, 3:04 p.m. OK Delphi TESTS 64 140 13721600 1500
70990495 hkwalker B Feb. 13, 2020, 3:41 p.m. OK FPC TESTS 64 124 716800 1500
70977355 LaSWeeG B Feb. 13, 2020, 3:06 p.m. OK FPC TESTS 64 124 2252800 1500
71092824 nelson_a B Feb. 15, 2020, 2:58 a.m. OK GNU C11 TESTS 64 93 0 1500
70984640 NhatLe B Feb. 13, 2020, 3:25 p.m. OK GNU C11 TESTS 64 93 409600 1500
70987235 1_l B Feb. 13, 2020, 3:32 p.m. OK GNU C11 TESTS 64 93 409600 1500
71010797 rainboy B Feb. 13, 2020, 5:35 p.m. OK GNU C11 TESTS 64 93 409600 1500
71015623 bogdanf555 B Feb. 13, 2020, 6:31 p.m. OK GNU C11 TESTS 64 93 409600 1500
71018766 kaiboy B Feb. 13, 2020, 7:31 p.m. OK GNU C11 TESTS 64 93 409600 1500
70973002 _Rebellion B Feb. 13, 2020, 2:56 p.m. OK GNU C11 TESTS 64 93 409600 1500
70980122 kernel.bin B Feb. 13, 2020, 3:13 p.m. OK GNU C11 TESTS 64 93 409600 1500
70980316 chayhyeon B Feb. 13, 2020, 3:13 p.m. OK GNU C11 TESTS 64 93 409600 1500
71080563 akash19jain B Feb. 14, 2020, 6:52 p.m. OK GNU C11 TESTS 64 93 819200 1500
70972354 LZHMmiao B Feb. 13, 2020, 2:54 p.m. OK GNU C++11 TESTS 64 46 204800 1500
70973175 RoadToIntrovert B Feb. 13, 2020, 2:56 p.m. OK GNU C++11 TESTS 64 46 409600 1500
71031566 WangXueYan B Feb. 14, 2020, 3:31 a.m. OK GNU C++11 TESTS 64 46 409600 1500
70978295 Long_voyage B Feb. 13, 2020, 3:08 p.m. OK GNU C++11 TESTS 64 46 409600 1500
70973229 jerry3128 B Feb. 13, 2020, 2:56 p.m. OK GNU C++11 TESTS 64 46 409600 1500
70973043 wqst B Feb. 13, 2020, 2:56 p.m. OK GNU C++11 TESTS 64 46 409600 1500
70987558 MrJoker B Feb. 13, 2020, 3:33 p.m. OK GNU C++11 TESTS 64 46 409600 1500
70991653 Contna B Feb. 13, 2020, 3:45 p.m. OK GNU C++11 TESTS 64 46 409600 1500
71026442 wxyww B Feb. 14, 2020, 12:09 a.m. OK GNU C++11 TESTS 64 46 409600 1500
71027046 TYGZ B Feb. 14, 2020, 12:44 a.m. OK GNU C++11 TESTS 64 46 409600 1500
70994413 vishnu_m B Feb. 13, 2020, 3:53 p.m. OK GNU C++14 TESTS 64 46 409600 1500
70972699 Lezedary_sandwich B Feb. 13, 2020, 2:55 p.m. OK GNU C++14 TESTS 64 46 512000 1500
70973373 zcb B Feb. 13, 2020, 2:57 p.m. OK GNU C++14 TESTS 64 93 819200 1500
71028278 SpringsVGC B Feb. 14, 2020, 1:39 a.m. OK GNU C++14 TESTS 64 93 7577600 1500
70980812 Begetto B Feb. 13, 2020, 3:14 p.m. OK GNU C++14 TESTS 64 109 409600 1500
71064222 dahoon46 B Feb. 14, 2020, 2:08 p.m. OK GNU C++14 TESTS 64 109 409600 1500
71027983 tenglong B Feb. 14, 2020, 1:27 a.m. OK GNU C++14 TESTS 64 109 409600 1500
71027341 I_love_you_my_girl B Feb. 14, 2020, 12:59 a.m. OK GNU C++14 TESTS 64 109 409600 1500
71020984 tbzard B Feb. 13, 2020, 8:22 p.m. OK GNU C++14 TESTS 64 109 409600 1500
70999640 Develop_HARIFF B Feb. 13, 2020, 4:09 p.m. OK GNU C++14 TESTS 64 109 409600 1500
70973596 Alphagocc B Feb. 13, 2020, 2:57 p.m. OK GNU C++17 TESTS 64 46 1638400 1500
71060057 Fire_ass B Feb. 14, 2020, 1:11 p.m. OK GNU C++17 TESTS 64 93 409600 1500
70973548 thtsshz_bgwrswh B Feb. 13, 2020, 2:57 p.m. OK GNU C++17 TESTS 64 93 409600 1500
70981022 facedawn B Feb. 13, 2020, 3:15 p.m. OK GNU C++17 TESTS 64 93 409600 1500
70976507 yc0304 B Feb. 13, 2020, 3:04 p.m. OK GNU C++17 TESTS 64 93 1126400 1500
70982757 hertom5896 B Feb. 13, 2020, 3:20 p.m. OK GNU C++17 TESTS 64 93 1126400 1500
70978976 angrysqrt3 B Feb. 13, 2020, 3:10 p.m. OK GNU C++17 TESTS 64 93 1945600 1500
70977484 Lenick B Feb. 13, 2020, 3:06 p.m. OK GNU C++17 TESTS 64 93 2457600 1500
71018156 Yuki726 B Feb. 13, 2020, 7:18 p.m. OK GNU C++17 TESTS 64 93 7884800 1500
71069104 vjudge4 B Feb. 14, 2020, 3:24 p.m. OK GNU C++17 TESTS 64 93 56115200 1500
70985029 naipia B Feb. 13, 2020, 3:26 p.m. OK Go TESTS 64 77 4710400 1500
70981741 Jughead B Feb. 13, 2020, 3:17 p.m. OK Go TESTS 64 93 0 1500
70974305 u1s1reallycai B Feb. 13, 2020, 2:59 p.m. OK Go TESTS 64 358 5324800 1500
70982112 nayix B Feb. 13, 2020, 3:18 p.m. OK Go TESTS 64 452 4915200 1500
70991374 work_harder B Feb. 13, 2020, 3:44 p.m. OK Go TESTS 64 577 4710400 1500
70975062 kashishsingh8700 B Feb. 13, 2020, 3:01 p.m. OK Java 11 TESTS 64 233 0 1500
70978773 avijit_agarwal B Feb. 13, 2020, 3:10 p.m. OK Java 11 TESTS 64 249 0 1500
70984353 saurabh0611 B Feb. 13, 2020, 3:24 p.m. OK Java 11 TESTS 64 264 204800 1500
71078412 alankritanand001 B Feb. 14, 2020, 6:08 p.m. OK Java 11 TESTS 64 280 307200 1500
70973124 AshrafEzz B Feb. 13, 2020, 2:56 p.m. OK Java 11 TESTS 64 280 307200 1500
71010219 warrioramrit B Feb. 13, 2020, 5:31 p.m. OK Java 11 TESTS 64 295 0 1500
71001643 DreamInfinite B Feb. 13, 2020, 4:16 p.m. OK Java 11 TESTS 64 295 614400 1500
70992560 garg_vibhor B Feb. 13, 2020, 3:47 p.m. OK Java 11 TESTS 64 296 204800 1500
70973139 bleh0.6 B Feb. 13, 2020, 2:56 p.m. OK Java 11 TESTS 64 296 307200 1500
70991249 sarthak.0702 B Feb. 13, 2020, 3:44 p.m. OK Java 11 TESTS 64 311 0 1500
71041391 In_The_Name_Of_Love B Feb. 14, 2020, 7:01 a.m. OK Java 8 TESTS 64 140 0 1500
71025675 bluesky111 B Feb. 13, 2020, 11:19 p.m. OK Java 8 TESTS 64 140 0 1500
71019717 conquerorArpit B Feb. 13, 2020, 7:51 p.m. OK Java 8 TESTS 64 140 0 1500
70985901 Abhinav_Mani B Feb. 13, 2020, 3:28 p.m. OK Java 8 TESTS 64 140 0 1500
70981913 hushojin B Feb. 13, 2020, 3:17 p.m. OK Java 8 TESTS 64 140 0 1500
70976051 Charlesna B Feb. 13, 2020, 3:03 p.m. OK Java 8 TESTS 64 155 0 1500
71012493 shashwat07 B Feb. 13, 2020, 5:50 p.m. OK Java 8 TESTS 64 155 0 1500
70997247 bhautik_77 B Feb. 13, 2020, 4:02 p.m. OK Java 8 TESTS 64 155 0 1500
70983611 Apurva021 B Feb. 13, 2020, 3:22 p.m. OK Java 8 TESTS 64 155 0 1500
71011956 Amitkumarjain007 B Feb. 13, 2020, 5:45 p.m. OK Java 8 TESTS 64 156 0 1500
71040420 Spheniscine B Feb. 14, 2020, 6:45 a.m. OK Kotlin TESTS 64 202 4505600 1500
70975266 Denzed B Feb. 13, 2020, 3:01 p.m. OK Kotlin TESTS 64 639 9216000 1500
71074259 Glebik8 B Feb. 14, 2020, 4:50 p.m. OK Kotlin TESTS 64 702 10854400 1500
70989872 ohoh430 B Feb. 13, 2020, 3:40 p.m. OK Kotlin TESTS 64 717 0 1500
70973675 T-D-K B Feb. 13, 2020, 2:57 p.m. OK Mono C# TESTS 64 77 3174400 1500
70995672 riantkb B Feb. 13, 2020, 3:57 p.m. OK Mono C# TESTS 64 171 42598400 1500
71004326 eki B Feb. 13, 2020, 4:25 p.m. OK Mono C# TESTS 64 202 37683200 1500
70995983 artworks B Feb. 13, 2020, 3:58 p.m. OK Mono C# TESTS 64 202 43212800 1500
70975478 balibalo756 B Feb. 13, 2020, 3:02 p.m. OK Mono C# TESTS 64 218 37478400 1500
70981713 sergmel B Feb. 13, 2020, 3:17 p.m. OK Mono C# TESTS 64 233 38195200 1500
70974477 hibatibati B Feb. 13, 2020, 2:59 p.m. OK Mono C# TESTS 64 233 42598400 1500
70979426 plasma-effect B Feb. 13, 2020, 3:11 p.m. OK Mono C# TESTS 64 234 42496000 1500
70971603 mban259 B Feb. 13, 2020, 2:52 p.m. OK Mono C# TESTS 64 249 43008000 1500
70971191 Yupiteru B Feb. 13, 2020, 2:51 p.m. OK Mono C# TESTS 64 249 179609600 1500
71029451 NaGuT B Feb. 14, 2020, 2:24 a.m. OK MS C++ TESTS 64 93 409600 1500
70976158 tarattata1 B Feb. 13, 2020, 3:03 p.m. OK MS C++ TESTS 64 93 409600 1500
70991649 bj126627885 B Feb. 13, 2020, 3:45 p.m. OK MS C++ TESTS 64 93 409600 1500
70979794 songhaoran B Feb. 13, 2020, 3:12 p.m. OK MS C++ TESTS 64 171 819200 1500
70975391 kwfumou1242 B Feb. 13, 2020, 3:01 p.m. OK MS C++ TESTS 64 343 26214400 1500
71003438 Yidaibajun B Feb. 13, 2020, 4:22 p.m. OK MS C++ TESTS 64 358 409600 1500
71004977 najebe B Feb. 13, 2020, 4:27 p.m. OK MS C++ TESTS 64 358 1638400 1500
70993648 hack2kong B Feb. 13, 2020, 3:51 p.m. OK MS C++ 2017 TESTS 64 139 409600 1500
70974665 youx B Feb. 13, 2020, 3 p.m. OK MS C++ 2017 TESTS 64 140 409600 1500
71035668 oceanlin B Feb. 14, 2020, 5:20 a.m. OK MS C++ 2017 TESTS 64 140 409600 1500
71031489 vjudge5 B Feb. 14, 2020, 3:29 a.m. OK MS C++ 2017 TESTS 64 140 409600 1500
70994871 Fire_ass B Feb. 13, 2020, 3:54 p.m. OK MS C++ 2017 TESTS 64 140 409600 1500
70983415 11D_Beyonder B Feb. 13, 2020, 3:21 p.m. OK MS C++ 2017 TESTS 64 140 716800 1500
71050796 teeu B Feb. 14, 2020, 9:54 a.m. OK MS C++ 2017 TESTS 64 140 1228800 1500
70974119 egardoz01 B Feb. 13, 2020, 2:58 p.m. OK MS C++ 2017 TESTS 64 155 409600 1500
70978300 hnust_zhouzisheng B Feb. 13, 2020, 3:08 p.m. OK MS C++ 2017 TESTS 64 155 409600 1500
70984815 LeeLdler B Feb. 13, 2020, 3:25 p.m. OK MS C++ 2017 TESTS 64 155 819200 1500
70977771 klond90 B Feb. 13, 2020, 3:07 p.m. OK Node.js TESTS 64 311 25190400 1500
70986284 rsFalse B Feb. 13, 2020, 3:29 p.m. OK Perl TESTS 64 483 26009600 1500
71031575 Bekzaat17 B Feb. 14, 2020, 3:32 a.m. OK PHP TESTS 64 499 22732800 1500
70972594 Horse-kun B Feb. 13, 2020, 2:55 p.m. OK PyPy 2 TESTS 64 233 23654400 1500
71019736 raj1307 B Feb. 13, 2020, 7:51 p.m. OK PyPy 2 TESTS 64 234 23040000 1500
70982687 kabeer27 B Feb. 13, 2020, 3:19 p.m. OK PyPy 2 TESTS 64 264 22732800 1500
70975776 11fingers B Feb. 13, 2020, 3:02 p.m. OK PyPy 2 TESTS 64 420 13414400 1500
70982864 rkstalker B Feb. 13, 2020, 3:20 p.m. OK PyPy 2 TESTS 64 998 15667200 1500
71001463 hritik3878 B Feb. 13, 2020, 4:16 p.m. OK PyPy 2 TESTS 64 1404 30412800 1500
70973773 jatin__barley B Feb. 13, 2020, 2:58 p.m. OK PyPy 3 TESTS 64 280 23654400 1500
70977275 siyy B Feb. 13, 2020, 3:06 p.m. OK PyPy 3 TESTS 64 389 24268800 1500
71053905 aberent B Feb. 14, 2020, 11:02 a.m. OK PyPy 3 TESTS 64 498 15052800 1500
70977534 cho12 B Feb. 13, 2020, 3:07 p.m. OK PyPy 3 TESTS 64 514 15360000 1500
71063643 Anuranjan_Pandey B Feb. 14, 2020, 2 p.m. OK PyPy 3 TESTS 64 514 15769600 1500
71039401 Sameer-Mann B Feb. 14, 2020, 6:28 a.m. OK PyPy 3 TESTS 64 514 16486400 1500
71036287 tachyon777 B Feb. 14, 2020, 5:33 a.m. OK PyPy 3 TESTS 64 514 16691200 1500
70984674 tinker_1337 B Feb. 13, 2020, 3:25 p.m. OK PyPy 3 TESTS 64 514 16691200 1500
71076210 shantol B Feb. 14, 2020, 5:23 p.m. OK PyPy 3 TESTS 64 514 16793600 1500
71058907 snape_here B Feb. 14, 2020, 12:54 p.m. OK PyPy 3 TESTS 64 514 16793600 1500
71081007 sgaurav1999 B Feb. 14, 2020, 7:02 p.m. OK Python 2 TESTS 64 623 9420800 1500
70986693 Hitikkumar B Feb. 13, 2020, 3:30 p.m. OK Python 2 TESTS 64 701 9420800 1500
70982576 clandestine_ B Feb. 13, 2020, 3:19 p.m. OK Python 2 TESTS 64 857 11776000 1500
71033269 eugalt B Feb. 14, 2020, 4:19 a.m. OK Python 3 TESTS 64 358 11059200 1500
71021436 eugalt B Feb. 13, 2020, 8:33 p.m. OK Python 3 TESTS 64 373 11264000 1500
71036896 eugalt B Feb. 14, 2020, 5:44 a.m. OK Python 3 TESTS 64 374 11161600 1500
71032901 eugalt B Feb. 14, 2020, 4:09 a.m. OK Python 3 TESTS 64 374 11161600 1500
71004292 TheMisfits B Feb. 13, 2020, 4:25 p.m. OK Python 3 TESTS 64 374 11161600 1500
71021249 eugalt B Feb. 13, 2020, 8:28 p.m. OK Python 3 TESTS 64 374 11264000 1500
71020799 eugalt B Feb. 13, 2020, 8:17 p.m. OK Python 3 TESTS 64 374 11264000 1500
71011481 eugalt B Feb. 13, 2020, 5:41 p.m. OK Python 3 TESTS 64 374 11878400 1500
71031879 eugalt B Feb. 14, 2020, 3:40 a.m. OK Python 3 TESTS 64 405 11264000 1500
71019858 eugalt B Feb. 13, 2020, 7:54 p.m. OK Python 3 TESTS 64 405 11776000 1500
70977199 simanman B Feb. 13, 2020, 3:06 p.m. OK Ruby TESTS 64 545 34099200 1500
70973443 knshnb B Feb. 13, 2020, 2:57 p.m. OK Rust TESTS 64 249 409600 1500
70979183 BadDuck B Feb. 13, 2020, 3:11 p.m. OK Scala TESTS 64 748 11673600 1500
71051707 kushwaha_vi B Feb. 14, 2020, 10:12 a.m. OK Scala TESTS 64 1138 4608000 1500

remove filters

Back to search problems