Good Bye 2019

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
1270 Good Bye 2019 FINISHED False 10800 154194899 Dec. 29, 2019, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 16447 ) B Interesting Subarray PROGRAMMING constructive algorithms greedy math 1300

B'For an array a of integers let 's denote its maximal element as max(a) , and minimal as min(a) . We will call an array a of k integers interesting if max(a) - min(a) ge k . For example, array [1, 3, 4, 3] isn 't interesting as max(a) - min(a) = 4 - 1 = 3 < 4 while array [7, 3, 0, 4, 3] is as max(a) - min(a) = 7 - 0 = 7 ge 5 . You are given an array a of n integers. Find some interesting nonempty subarray of a , or tell that it doesn 't exist. An array b is a subarray of an array a if b can be obtained from a by deletion of several (possibly, zero or all) elements from the beginning and several (possibly, zero or all) elements from the end. In particular, an array is a subarray of itself. The first line contains integer number t ( 1 <= t <= 10 ,000 ). Then t test cases follow. The first line of each test case contains a single integer n ( 2 <= n <= 2 cdot 10^5 ) -- the length of the array. The second line of each test case contains n integers a_1, a_2, ... , a_n ( 0 <= a_i <= 10^9 ) -- the elements of the array. It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, output "NO" in a separate line if there is no interesting nonempty subarray in a . Otherwise, output "YES" in a separate line. In the next line, output two integers l and r ( 1 <= l <= r <= n ) -- bounds of the chosen subarray. If there are multiple answers, print any. You can print each letter in any case (upper or lower). In the second test case of the example, one of the interesting subarrays is a = [2, 0, 1, 9] : max(a) - min(a) = 9 - 0 = 9 ge 4 . '...

Tutorials

Разбор Goodbye 2019

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
68186536 shrey82 B Jan. 4, 2020, 1:29 p.m. OK Clang++17 Diagnostics TESTS 27 998 1740800 1300
67893000 daut-dlang B Dec. 29, 2019, 2:29 p.m. OK D TESTS 27 62 11571200 1300
67885540 private_yusuke B Dec. 29, 2019, 2:16 p.m. OK D TESTS 27 77 11571200 1300
67883475 Gassa B Dec. 29, 2019, 2:13 p.m. OK D TESTS 27 77 11571200 1300
67886529 iica B Dec. 29, 2019, 2:17 p.m. OK D TESTS 27 77 11673600 1300
67939591 agibson B Dec. 29, 2019, 11:04 p.m. OK D TESTS 27 78 11571200 1300
67921427 ImanKz B Dec. 29, 2019, 4:20 p.m. OK Delphi TESTS 27 77 1024000 1300
67884861 ruban B Dec. 29, 2019, 2:15 p.m. OK Delphi TESTS 27 77 13721600 1300
68150730 BBC5555 B Jan. 4, 2020, 6:47 a.m. OK FPC TESTS 27 62 1024000 1300
68585431 canhtoantpvp B Jan. 11, 2020, 11:08 a.m. OK FPC TESTS 27 77 921600 1300
67906156 minh04 B Dec. 29, 2019, 3:06 p.m. OK FPC TESTS 27 77 3993600 1300
67969608 tranminhprvt01 B Dec. 30, 2019, 2:32 p.m. OK FPC TESTS 27 78 3993600 1300
67887724 Kakalinn B Dec. 29, 2019, 2:19 p.m. OK GNU C11 TESTS 27 31 819200 1300
67942366 harsha.pathuri B Dec. 30, 2019, 2:28 a.m. OK GNU C11 TESTS 27 46 819200 1300
67930914 NHNzhz B Dec. 29, 2019, 5:58 p.m. OK GNU C11 TESTS 27 46 819200 1300
69219660 khalil18 B Jan. 21, 2020, 3:42 a.m. OK GNU C11 TESTS 27 46 819200 1300
68403410 wrhow B Jan. 8, 2020, 1:59 p.m. OK GNU C11 TESTS 27 46 3993600 1300
67905319 TARIQ B Dec. 29, 2019, 3:03 p.m. OK GNU C11 TESTS 27 61 0 1300
69188305 mth1908 B Jan. 20, 2020, 12:43 p.m. OK GNU C11 TESTS 27 61 819200 1300
67916249 alpha7 B Dec. 29, 2019, 3:50 p.m. OK GNU C11 TESTS 27 61 819200 1300
67931938 Trinadh724 B Dec. 29, 2019, 6:20 p.m. OK GNU C11 TESTS 27 61 819200 1300
67939713 ArmU B Dec. 29, 2019, 11:11 p.m. OK GNU C11 TESTS 27 61 819200 1300
67907086 wannaAC B Dec. 29, 2019, 3:09 p.m. OK GNU C++11 TESTS 27 30 3993600 1300
68100843 luogu_bot1 B Jan. 3, 2020, 2:48 a.m. OK GNU C++11 TESTS 27 31 614400 1300
67992943 Big_black_jujube B Dec. 31, 2019, 6:19 a.m. OK GNU C++11 TESTS 27 31 819200 1300
68107980 master_rat1 B Jan. 3, 2020, 8:10 a.m. OK GNU C++11 TESTS 27 31 819200 1300
68649535 vjudge4 B Jan. 12, 2020, 10:16 a.m. OK GNU C++11 TESTS 27 31 819200 1300
68329023 luogu_bot4 B Jan. 6, 2020, 5:59 p.m. OK GNU C++11 TESTS 27 31 819200 1300
68585846 zxynothing B Jan. 11, 2020, 11:14 a.m. OK GNU C++11 TESTS 27 31 819200 1300
68632421 Karry5307 B Jan. 12, 2020, 3:46 a.m. OK GNU C++11 TESTS 27 31 819200 1300
68071825 A.K.E.E. B Jan. 2, 2020, 10:40 a.m. OK GNU C++11 TESTS 27 31 819200 1300
68029030 stal_xy23z7b8 B Jan. 1, 2020, 8 a.m. OK GNU C++11 TESTS 27 31 819200 1300
67897402 vishnu_m B Dec. 29, 2019, 2:39 p.m. OK GNU C++14 TESTS 27 31 0 1300
67890675 tokitsukaze B Dec. 29, 2019, 2:24 p.m. OK GNU C++14 TESTS 27 31 921600 1300
67883047 nehnait B Dec. 29, 2019, 2:12 p.m. OK GNU C++14 TESTS 27 31 5017600 1300
67943210 neckhill007 B Dec. 30, 2019, 3:16 a.m. OK GNU C++14 TESTS 27 46 819200 1300
67934146 Whiclips B Dec. 29, 2019, 7:18 p.m. OK GNU C++14 TESTS 27 46 819200 1300
68742412 LmfEthan B Jan. 14, 2020, 2:15 a.m. OK GNU C++14 TESTS 27 46 819200 1300
67882694 Linkus B Dec. 29, 2019, 2:12 p.m. OK GNU C++14 TESTS 27 46 819200 1300
68148647 zishan_k B Jan. 4, 2020, 5:54 a.m. OK GNU C++14 TESTS 27 46 1536000 1300
67891356 noimi B Dec. 29, 2019, 2:26 p.m. OK GNU C++14 TESTS 27 46 1638400 1300
67890638 idxcalcal B Dec. 29, 2019, 2:24 p.m. OK GNU C++14 TESTS 27 46 1843200 1300
67882087 user202729_ B Dec. 29, 2019, 2:11 p.m. OK GNU C++17 TESTS 27 31 0 1300
67878598 yosupo B Dec. 29, 2019, 2:08 p.m. OK GNU C++17 TESTS 27 31 819200 1300
67894222 huas_teble B Dec. 29, 2019, 2:32 p.m. OK GNU C++17 TESTS 27 31 4198400 1300
67951564 Mursaleen B Dec. 30, 2019, 7:53 a.m. OK GNU C++17 TESTS 27 46 0 1300
67941844 wayyeah B Dec. 30, 2019, 1:50 a.m. OK GNU C++17 TESTS 27 46 819200 1300
67961623 5130 B Dec. 30, 2019, 11:48 a.m. OK GNU C++17 TESTS 27 46 819200 1300
68674915 .tx B Jan. 12, 2020, 6:11 p.m. OK GNU C++17 TESTS 27 46 819200 1300
67999855 LiChenKoh B Dec. 31, 2019, 10:12 a.m. OK GNU C++17 TESTS 27 46 1228800 1300
67902485 whzzt B Dec. 29, 2019, 2:54 p.m. OK GNU C++17 TESTS 27 46 16281600 1300
68116725 keshav.maverick B Jan. 3, 2020, 11:43 a.m. OK GNU C++17 TESTS 27 46 81715200 1300
67923338 yuki2006 B Dec. 29, 2019, 4:32 p.m. OK Go TESTS 27 77 9113600 1300
67917219 justcode_fk B Dec. 29, 2019, 3:56 p.m. OK Go TESTS 27 93 4608000 1300
68019715 pain_nagato B Dec. 31, 2019, 9:33 p.m. OK Go TESTS 27 171 4505600 1300
67946923 jelech2018 B Dec. 30, 2019, 5:49 a.m. OK Go TESTS 27 186 4505600 1300
67891870 u1s1reallycai B Dec. 29, 2019, 2:27 p.m. OK Go TESTS 27 186 4505600 1300
68038055 thisbeit B Jan. 1, 2020, 1:03 p.m. OK Java 11 TESTS 27 186 0 1300
67958412 Anonymous B Dec. 30, 2019, 10:35 a.m. OK Java 11 TESTS 27 187 0 1300
68101632 TheLisztomaniac B Jan. 3, 2020, 3:40 a.m. OK Java 11 TESTS 27 202 0 1300
67899328 MaxHeap B Dec. 29, 2019, 2:44 p.m. OK Java 11 TESTS 27 202 0 1300
67885416 Musin B Dec. 29, 2019, 2:16 p.m. OK Java 11 TESTS 27 218 0 1300
67892236 vaibhavpulastya B Dec. 29, 2019, 2:28 p.m. OK Java 11 TESTS 27 218 0 1300
67933054 Nisiddharth B Dec. 29, 2019, 6:47 p.m. OK Java 11 TESTS 27 218 204800 1300
67930552 Piccadilly B Dec. 29, 2019, 5:51 p.m. OK Java 11 TESTS 27 233 0 1300
67908985 nik77kez B Dec. 29, 2019, 3:17 p.m. OK Java 11 TESTS 27 233 0 1300
68133189 about B Jan. 3, 2020, 5:46 p.m. OK Java 11 TESTS 27 233 204800 1300
67941125 luchy0120 B Dec. 30, 2019, 12:56 a.m. OK Java 8 TESTS 27 109 0 1300
68351304 Bhavya_Arora B Jan. 7, 2020, 9:59 a.m. OK Java 8 TESTS 27 124 0 1300
68234808 Mann_27__ B Jan. 5, 2020, 10:33 a.m. OK Java 8 TESTS 27 124 0 1300
68153176 Apurva021 B Jan. 4, 2020, 7:47 a.m. OK Java 8 TESTS 27 124 0 1300
68089971 Ad-007 B Jan. 2, 2020, 5:45 p.m. OK Java 8 TESTS 27 124 0 1300
68076881 Anonymous9 B Jan. 2, 2020, 12:53 p.m. OK Java 8 TESTS 27 124 0 1300
68025454 programbhavan B Jan. 1, 2020, 5:17 a.m. OK Java 8 TESTS 27 124 0 1300
67968153 nandit B Dec. 30, 2019, 2:03 p.m. OK Java 8 TESTS 27 124 0 1300
67948605 manish_98 B Dec. 30, 2019, 6:39 a.m. OK Java 8 TESTS 27 124 0 1300
67946007 Faizan B Dec. 30, 2019, 5:18 a.m. OK Java 8 TESTS 27 124 0 1300
67894525 Rinat_ B Dec. 29, 2019, 2:32 p.m. OK JavaScript TESTS 27 124 19148800 1300
68382077 Spheniscine B Jan. 8, 2020, 2:23 a.m. OK Kotlin TESTS 27 171 4505600 1300
67998516 amirrr B Dec. 31, 2019, 9:30 a.m. OK Kotlin TESTS 27 186 5632000 1300
68042018 HavlongRG B Jan. 1, 2020, 2:45 p.m. OK Kotlin TESTS 27 218 18636800 1300
67911973 bulkasmakom B Dec. 29, 2019, 3:29 p.m. OK Kotlin TESTS 27 249 18124800 1300
67905896 blole B Dec. 29, 2019, 3:05 p.m. OK Kotlin TESTS 27 265 16179200 1300
67928424 slemus B Dec. 29, 2019, 5:02 p.m. OK Kotlin TESTS 27 280 21196800 1300
67885012 Tlatoani B Dec. 29, 2019, 2:15 p.m. OK Kotlin TESTS 27 326 5222400 1300
67908134 ZALeo B Dec. 29, 2019, 3:13 p.m. OK Kotlin TESTS 27 342 15564800 1300
67927179 Arkabekuly_Mukhtar B Dec. 29, 2019, 4:56 p.m. OK Kotlin TESTS 27 358 15564800 1300
67881945 knightL B Dec. 29, 2019, 2:11 p.m. OK Kotlin TESTS 27 358 15564800 1300
67891546 mban259 B Dec. 29, 2019, 2:26 p.m. OK Mono C# TESTS 27 109 26112000 1300
67890763 riantkb B Dec. 29, 2019, 2:25 p.m. OK Mono C# TESTS 27 109 33075200 1300
68006625 camypaper B Dec. 31, 2019, 1:30 p.m. OK Mono C# TESTS 27 109 53964800 1300
68084067 Anastasiya_Andreevna B Jan. 2, 2020, 3:31 p.m. OK Mono C# TESTS 27 124 23859200 1300
67910035 sergmel B Dec. 29, 2019, 3:21 p.m. OK Mono C# TESTS 27 124 25395200 1300
67913975 Ruban_Denic B Dec. 29, 2019, 3:39 p.m. OK Mono C# TESTS 27 124 26009600 1300
67882247 chokudai B Dec. 29, 2019, 2:11 p.m. OK Mono C# TESTS 27 124 26009600 1300
67891793 balibalo756 B Dec. 29, 2019, 2:27 p.m. OK Mono C# TESTS 27 124 26112000 1300
67904209 thetansquared B Dec. 29, 2019, 2:59 p.m. OK Mono C# TESTS 27 124 26112000 1300
67889365 keymoon B Dec. 29, 2019, 2:22 p.m. OK Mono C# TESTS 27 124 31641600 1300
68097207 YTICpoch B Jan. 2, 2020, 9:48 p.m. OK MS C++ TESTS 27 46 819200 1300
68009099 vjudge1 B Dec. 31, 2019, 2:48 p.m. OK MS C++ TESTS 27 46 819200 1300
68650050 vjudge1 B Jan. 12, 2020, 10:27 a.m. OK MS C++ TESTS 27 46 819200 1300
69332590 vjudge5 B Jan. 22, 2020, 3:16 p.m. OK MS C++ TESTS 27 46 819200 1300
68649515 vjudge2 B Jan. 12, 2020, 10:16 a.m. OK MS C++ TESTS 27 46 1024000 1300
68899357 vjudge4 B Jan. 16, 2020, 5:34 a.m. OK MS C++ TESTS 27 46 3993600 1300
68011999 vjudge4 B Dec. 31, 2019, 4:19 p.m. OK MS C++ TESTS 27 61 0 1300
67888096 math957963 B Dec. 29, 2019, 2:20 p.m. OK MS C++ TESTS 27 61 0 1300
68772500 vjudge1 B Jan. 14, 2020, 12:22 p.m. OK MS C++ TESTS 27 61 819200 1300
68650732 vjudge4 B Jan. 12, 2020, 10:38 a.m. OK MS C++ TESTS 27 61 819200 1300
67923797 sA1monxGod B Dec. 29, 2019, 4:35 p.m. OK MS C++ 2017 TESTS 27 77 0 1300
69167557 vjudge1 B Jan. 20, 2020, 4:42 a.m. OK MS C++ 2017 TESTS 27 78 819200 1300
67890446 Player1_SERG B Dec. 29, 2019, 2:24 p.m. OK MS C++ 2017 TESTS 27 78 1638400 1300
67905386 IronArt B Dec. 29, 2019, 3:03 p.m. OK MS C++ 2017 TESTS 27 78 1638400 1300
67883111 pichulia B Dec. 29, 2019, 2:12 p.m. OK MS C++ 2017 TESTS 27 93 819200 1300
67911675 Laaahu_ B Dec. 29, 2019, 3:28 p.m. OK MS C++ 2017 TESTS 27 93 819200 1300
67911783 ningBr B Dec. 29, 2019, 3:29 p.m. OK MS C++ 2017 TESTS 27 93 819200 1300
67913339 wingchang B Dec. 29, 2019, 3:36 p.m. OK MS C++ 2017 TESTS 27 93 819200 1300
67922179 nervana B Dec. 29, 2019, 4:25 p.m. OK MS C++ 2017 TESTS 27 93 819200 1300
68109301 hack2kong B Jan. 3, 2020, 8:49 a.m. OK MS C++ 2017 TESTS 27 93 819200 1300
67972489 Tomasz43 B Dec. 30, 2019, 3:33 p.m. OK Node.js TESTS 27 265 26624000 1300
67917580 fakename B Dec. 29, 2019, 3:57 p.m. OK Node.js TESTS 27 280 26624000 1300
68153900 Mandalorec B Jan. 4, 2020, 8:06 a.m. OK PascalABC.NET TESTS 27 483 512000 1300
67887523 rsFalse B Dec. 29, 2019, 2:19 p.m. OK Perl TESTS 27 171 28569600 1300
67974502 mayakin B Dec. 30, 2019, 4:20 p.m. OK PHP TESTS 27 77 18432000 1300
67924839 evgeny.poloznov B Dec. 29, 2019, 4:42 p.m. OK PHP TESTS 27 77 24780800 1300
67950359 Kiral55 B Dec. 30, 2019, 7:22 a.m. OK PHP TESTS 27 92 18534400 1300
67965195 YESMAths B Dec. 30, 2019, 1:05 p.m. OK PyPy 2 TESTS 27 171 14950400 1300
67886634 bcollet B Dec. 29, 2019, 2:17 p.m. OK PyPy 2 TESTS 27 186 14643200 1300
67936983 raj1307 B Dec. 29, 2019, 8:52 p.m. OK PyPy 2 TESTS 27 186 15155200 1300
67885216 c1729 B Dec. 29, 2019, 2:15 p.m. OK PyPy 2 TESTS 27 202 13721600 1300
67885288 TheManTheMythTheLegend B Dec. 29, 2019, 2:16 p.m. OK PyPy 2 TESTS 27 202 16998400 1300
67884691 zdbtxdy B Dec. 29, 2019, 2:14 p.m. OK PyPy 2 TESTS 27 218 13721600 1300
68026122 apoorv1999 B Jan. 1, 2020, 5:54 a.m. OK PyPy 2 TESTS 27 264 13312000 1300
67936794 iamprayush B Dec. 29, 2019, 8:44 p.m. OK PyPy 2 TESTS 27 280 19660800 1300
68058099 pengyuhe B Jan. 1, 2020, 11:55 p.m. OK PyPy 2 TESTS 27 436 11571200 1300
67942902 aaa_bbb_ccc B Dec. 30, 2019, 3 a.m. OK PyPy 2 TESTS 27 436 11776000 1300
67889735 Mukundan314 B Dec. 29, 2019, 2:23 p.m. OK PyPy 3 TESTS 27 233 16076800 1300
67884490 edamat B Dec. 29, 2019, 2:14 p.m. OK PyPy 3 TESTS 27 264 16896000 1300
68077548 nikeshthapa255 B Jan. 2, 2020, 1:10 p.m. OK PyPy 3 TESTS 27 296 15667200 1300
68055562 Bovniova B Jan. 1, 2020, 10:13 p.m. OK PyPy 3 TESTS 27 296 15769600 1300
67997915 neterukun B Dec. 31, 2019, 9:12 a.m. OK PyPy 3 TESTS 27 296 15769600 1300
67947438 daminglu B Dec. 30, 2019, 6:05 a.m. OK PyPy 3 TESTS 27 296 16076800 1300
67887790 m.ni B Dec. 29, 2019, 2:19 p.m. OK PyPy 3 TESTS 27 311 14950400 1300
68929482 pranaymalhan B Jan. 16, 2020, 10:59 a.m. OK PyPy 3 TESTS 27 311 15769600 1300
67896366 titia B Dec. 29, 2019, 2:37 p.m. OK PyPy 3 TESTS 27 311 15769600 1300
67895434 kshitij_sodani B Dec. 29, 2019, 2:34 p.m. OK PyPy 3 TESTS 27 311 15769600 1300
68127705 harshsodi B Jan. 3, 2020, 3:48 p.m. OK Python 2 TESTS 27 296 11161600 1300
67885001 nwi B Dec. 29, 2019, 2:15 p.m. OK Python 2 TESTS 27 296 11776000 1300
67935165 elistark B Dec. 29, 2019, 7:48 p.m. OK Python 2 TESTS 27 311 11264000 1300
67948032 skaul05 B Dec. 30, 2019, 6:23 a.m. OK Python 2 TESTS 27 326 11468800 1300
67894729 anonymous0314 B Dec. 29, 2019, 2:33 p.m. OK Python 2 TESTS 27 327 11980800 1300
67896241 Kagemeka B Dec. 29, 2019, 2:36 p.m. OK Python 3 TESTS 27 202 16486400 1300
68566698 IngaleAnkur10 B Jan. 10, 2020, 9:53 p.m. OK Python 3 TESTS 27 202 16793600 1300
67984525 DanielHLelis B Dec. 30, 2019, 9:22 p.m. OK Python 3 TESTS 27 202 16896000 1300
67960592 you_are_fucker B Dec. 30, 2019, 11:24 a.m. OK Python 3 TESTS 27 202 16896000 1300
67903476 riskingh B Dec. 29, 2019, 2:57 p.m. OK Python 3 TESTS 27 202 16896000 1300
67912084 Gaurav1 B Dec. 29, 2019, 3:30 p.m. OK Python 3 TESTS 27 217 16384000 1300
68220708 milosz B Jan. 5, 2020, 4:30 a.m. OK Python 3 TESTS 27 217 16588800 1300
67924646 KpoxaPy B Dec. 29, 2019, 4:41 p.m. OK Python 3 TESTS 27 217 16588800 1300
68333907 kingmoshe B Jan. 6, 2020, 8:19 p.m. OK Python 3 TESTS 27 217 16691200 1300
67923656 Scopula B Dec. 29, 2019, 4:34 p.m. OK Python 3 TESTS 27 217 16896000 1300
68555494 BetBit B Jan. 10, 2020, 5:04 p.m. OK Rust TESTS 27 92 5529600 1300
67884938 limed B Dec. 29, 2019, 2:15 p.m. OK Scala TESTS 27 467 0 1300
68020148 bogdan10bos B Dec. 31, 2019, 10 p.m. OK Scala TESTS 27 545 14950400 1300
67959571 bogdan10bos B Dec. 30, 2019, 11:01 a.m. OK Scala TESTS 27 560 14950400 1300

remove filters

Back to search problems