Codeforces Round 520 (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
1062 Codeforces Round 520 (Div. 2) FINISHED False 7200 195315923 Nov. 14, 2018, 3:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 8888 ) A A Prank PROGRAMMING greedy implementation 1400

B"JATC and his friend Giraffe are currently in their room, solving some problems. Giraffe has written on the board an array a_1 , a_2 , ..., a_n of integers, such that 1 <= a_1 < a_2 < ldots < a_n <= 10^3 , and then went to the bathroom. JATC decided to prank his friend by erasing some consecutive elements in the array. Since he doesn't want for the prank to go too far, he will only erase in a way, such that Giraffe can still restore the array using the information from the remaining elements. Because Giraffe has created the array, he's also aware that it's an increasing array and all the elements are integers in the range [1, 10^3] . JATC wonders what is the greatest number of elements he can erase? The first line of the input contains a single integer n ( 1 <= n <= 100 ) -- the number of elements in the array. The second line of the input contains n integers a_i ( 1 <= a_1<a_2< ... <a_n <= 10^3 ) -- the array written by Giraffe. Print a single integer -- the maximum number of consecutive elements in the array that JATC can erase. If it is impossible to erase even a single element, print 0 . In the first example, JATC can erase the third and fourth elements, leaving the array [1, 3, _, _, 6, 9] . As you can see, there is only one way to fill in the blanks. In the second example, JATC can erase the second and the third elements. The array will become [998, _, _] . Because all the elements are less than or equal to 1000 , the array is still can be restored. Note, that he can't erase the first 2 elements. In the third example, JATC can erase the first 4 elements. Since all the elements are greater than or equal to 1 , Giraffe can still restore the array. Note, that he can't erase the last 4 elements. "...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
46569566 gururavi A Dec. 4, 2018, 4:24 a.m. OK Clang++17 Diagnostics TESTS 99 46 0 1400
46024668 Muhammad-2004 A Nov. 21, 2018, 10:29 a.m. OK Clang++17 Diagnostics TESTS 99 46 0 1400
63896777 vjudge5 A Oct. 31, 2019, 2:34 a.m. OK Clang++17 Diagnostics TESTS 99 46 1126400 1400
63884479 vjudge2 A Oct. 30, 2019, 11:27 p.m. OK Clang++17 Diagnostics TESTS 99 46 4198400 1400
63904796 vjudge5 A Oct. 31, 2019, 6:14 a.m. OK Clang++17 Diagnostics TESTS 99 62 0 1400
47342266 shubhamk_ojha A Dec. 21, 2018, 5:52 p.m. OK Clang++17 Diagnostics TESTS 99 62 307200 1400
47299734 shaurma2.0 A Dec. 20, 2018, 1:39 p.m. OK Delphi TESTS 99 31 102400 1400
45732708 leedinh A Nov. 14, 2018, 4:53 p.m. OK FPC TESTS 99 31 0 1400
45759851 samau07012005 A Nov. 15, 2018, 8:24 a.m. OK FPC TESTS 99 31 0 1400
45803378 PandaIsTheBest A Nov. 16, 2018, 2:32 p.m. OK FPC TESTS 99 31 0 1400
52261760 HSZ A April 3, 2019, 9:14 a.m. OK GNU C11 TESTS 99 31 0 1400
55087215 lus_ca A June 4, 2019, 1:01 p.m. OK GNU C11 TESTS 99 31 0 1400
55087366 vjudge1 A June 4, 2019, 1:05 p.m. OK GNU C11 TESTS 99 31 0 1400
55089168 vjudge5 A June 4, 2019, 1:47 p.m. OK GNU C11 TESTS 99 31 0 1400
55145513 vjudge3 A June 5, 2019, 3:12 p.m. OK GNU C11 TESTS 99 31 0 1400
55200906 ash070397 A June 6, 2019, 10:32 a.m. OK GNU C11 TESTS 99 31 0 1400
55208322 dhruvmalh A June 6, 2019, 1:32 p.m. OK GNU C11 TESTS 99 31 0 1400
67872070 Razvan2000f A Dec. 29, 2019, 11:52 a.m. OK GNU C11 TESTS 99 31 0 1400
51940892 gyuni2002 A March 28, 2019, 2:25 p.m. OK GNU C11 TESTS 99 31 0 1400
51941482 ziseoklee A March 28, 2019, 2:40 p.m. OK GNU C11 TESTS 99 31 0 1400
67206396 vectorishere A Dec. 19, 2019, 12:34 p.m. OK GNU C++11 TESTS 99 31 0 1400
69878832 Hpnes A Jan. 31, 2020, 5:29 a.m. OK GNU C++11 TESTS 99 31 0 1400
67940900 dismint A Dec. 30, 2019, 12:43 a.m. OK GNU C++11 TESTS 99 31 0 1400
68146095 unbelievable_aman A Jan. 4, 2020, 4:28 a.m. OK GNU C++11 TESTS 99 31 0 1400
68302029 linuxll A Jan. 6, 2020, 7:09 a.m. OK GNU C++11 TESTS 99 31 0 1400
69283171 AlanJobs A Jan. 22, 2020, 6:55 a.m. OK GNU C++11 TESTS 99 31 0 1400
69382777 Avign A Jan. 22, 2020, 8:25 p.m. OK GNU C++11 TESTS 99 31 0 1400
69394368 Bbaran A Jan. 23, 2020, 5:31 a.m. OK GNU C++11 TESTS 99 31 0 1400
69536409 switchpiggy A Jan. 25, 2020, 7:04 p.m. OK GNU C++11 TESTS 99 31 0 1400
69722579 rr_manish A Jan. 29, 2020, 11:12 a.m. OK GNU C++11 TESTS 99 31 0 1400
45767194 rishabh_sethi A Nov. 15, 2018, 12:44 p.m. OK GNU C++14 TESTS 99 15 0 1400
49548878 dengie A Feb. 7, 2019, 3:25 a.m. OK GNU C++14 TESTS 99 15 0 1400
55217591 itsme.kshitij A June 6, 2019, 5:36 p.m. OK GNU C++14 TESTS 99 30 0 1400
61564698 obeliks A Sept. 30, 2019, 4:43 p.m. OK GNU C++14 TESTS 99 30 0 1400
57096037 S_Aditya A July 15, 2019, 12:18 p.m. OK GNU C++14 TESTS 99 30 0 1400
55751730 aman_703 A June 19, 2019, 1:08 p.m. OK GNU C++14 TESTS 99 30 0 1400
55741890 mika_k A June 19, 2019, 7:54 a.m. OK GNU C++14 TESTS 99 30 0 1400
55737845 Khuch_Nahi_Aata A June 19, 2019, 5:40 a.m. OK GNU C++14 TESTS 99 30 0 1400
54806049 jinchuriki A May 29, 2019, 2:12 p.m. OK GNU C++14 TESTS 99 30 0 1400
51754671 vamshi_s15 A March 23, 2019, 11:03 a.m. OK GNU C++14 TESTS 99 30 0 1400
64170044 is_mail A Nov. 3, 2019, 5:59 p.m. OK GNU C++17 TESTS 99 15 0 1400
45748658 Khalid545 A Nov. 14, 2018, 9:58 p.m. OK GNU C++17 TESTS 99 15 307200 1400
53485962 MatheusLealV A April 29, 2019, 3:35 a.m. OK GNU C++17 TESTS 99 30 0 1400
55209644 kingcobrabt A June 6, 2019, 2:04 p.m. OK GNU C++17 TESTS 99 30 0 1400
55589853 fatnot A June 15, 2019, 11:43 a.m. OK GNU C++17 TESTS 99 30 0 1400
59070924 vjudge1 A Aug. 19, 2019, 4:42 a.m. OK GNU C++17 TESTS 99 30 0 1400
63087342 vky_rana A Oct. 21, 2019, 5:02 p.m. OK GNU C++17 TESTS 99 30 0 1400
69394102 minoum A Jan. 23, 2020, 5:23 a.m. OK GNU C++17 TESTS 99 30 0 1400
52825251 xm_831143 A April 16, 2019, 1:30 p.m. OK GNU C++17 TESTS 99 30 0 1400
50516535 LiPro A Feb. 26, 2019, 6:48 a.m. OK GNU C++17 TESTS 99 30 0 1400
63889772 vjudge2 A Oct. 31, 2019, 12:29 a.m. OK Go TESTS 99 46 0 1400
45985442 davidguandev A Nov. 20, 2018, 6:08 a.m. OK Go TESTS 99 46 0 1400
67988458 betcHajosHingjosH A Dec. 31, 2019, 1:58 a.m. OK Java 11 TESTS 99 171 0 1400
69516057 warrioramrit A Jan. 25, 2020, 12:01 p.m. OK Java 11 TESTS 99 187 0 1400
58541615 Ikari_stream A Aug. 10, 2019, 2:28 p.m. OK Java 8 TESTS 99 109 0 1400
68154237 GiantTornado A Jan. 4, 2020, 8:17 a.m. OK Java 8 TESTS 99 109 0 1400
58267982 AbdallahArafa A Aug. 4, 2019, 3:30 p.m. OK Java 8 TESTS 99 109 0 1400
58222824 JrElaraby A Aug. 3, 2019, 1:16 p.m. OK Java 8 TESTS 99 109 0 1400
55941361 Bhavya_Arora A June 22, 2019, 4:51 p.m. OK Java 8 TESTS 99 109 0 1400
52529174 xodiac A April 9, 2019, 12:48 p.m. OK Java 8 TESTS 99 109 0 1400
50806484 yaminote A March 5, 2019, 5:53 a.m. OK Java 8 TESTS 99 109 0 1400
49888697 Ahmed_Nasr A Feb. 14, 2019, 1:06 a.m. OK Java 8 TESTS 99 109 0 1400
49343628 YousseF_Diaa A Feb. 2, 2019, 3:15 a.m. OK Java 8 TESTS 99 109 0 1400
48550181 RasMalai A Jan. 19, 2019, 1:02 a.m. OK Java 8 TESTS 99 109 0 1400
45760109 zjhl2 A Nov. 15, 2018, 8:33 a.m. OK JavaScript TESTS 99 46 0 1400
46038253 sayeh A Nov. 21, 2018, 5:44 p.m. OK JavaScript TESTS 99 46 0 1400
45906906 Gray_Rhino A Nov. 18, 2018, 8:55 a.m. OK Mono C# TESTS 99 46 0 1400
45867736 nastya1199 A Nov. 17, 2018, 8:43 a.m. OK Mono C# TESTS 99 46 0 1400
45753413 tattosha_aptan A Nov. 15, 2018, 3:39 a.m. OK Mono C# TESTS 99 61 0 1400
45784339 niquefa_diego A Nov. 15, 2018, 11:04 p.m. OK Mono C# TESTS 99 61 0 1400
45791612 leign A Nov. 16, 2018, 7:30 a.m. OK Mono C# TESTS 99 61 0 1400
61457181 Tan42 A Sept. 29, 2019, 6:52 a.m. OK Mono C# TESTS 99 62 0 1400
55595014 og.kostya A June 15, 2019, 2:31 p.m. OK Mono C# TESTS 99 62 0 1400
45919585 DmitryDrozdov A Nov. 18, 2018, 3:47 p.m. OK Mono C# TESTS 99 62 0 1400
46844376 Mem A Dec. 10, 2018, 9:58 a.m. OK Mono C# TESTS 99 62 3584000 1400
63877183 vjudge4 A Oct. 30, 2019, 7:24 p.m. OK Mono C# TESTS 99 62 3584000 1400
63875009 vjudge2 A Oct. 30, 2019, 6:42 p.m. OK MS C++ TESTS 99 31 0 1400
63874569 basd A Oct. 30, 2019, 6:34 p.m. OK MS C++ TESTS 99 31 0 1400
63881434 vjudge2 A Oct. 30, 2019, 9:11 p.m. OK MS C++ TESTS 99 31 0 1400
63884385 vjudge4 A Oct. 30, 2019, 11:23 p.m. OK MS C++ TESTS 99 31 0 1400
63894558 vjudge3 A Oct. 31, 2019, 12:57 a.m. OK MS C++ TESTS 99 31 0 1400
63894632 vjudge4 A Oct. 31, 2019, 1:01 a.m. OK MS C++ TESTS 99 31 0 1400
63895096 vjudge1 A Oct. 31, 2019, 1:19 a.m. OK MS C++ TESTS 99 31 0 1400
63895751 vjudge4 A Oct. 31, 2019, 1:49 a.m. OK MS C++ TESTS 99 31 0 1400
63876888 vjudge3 A Oct. 30, 2019, 7:18 p.m. OK MS C++ TESTS 99 31 0 1400
63878899 zjuarez A Oct. 30, 2019, 7:59 p.m. OK MS C++ TESTS 99 31 0 1400
59912940 lokolo A Sept. 2, 2019, 5:56 p.m. OK MS C++ 2017 TESTS 99 31 0 1400
59072120 vjudge4 A Aug. 19, 2019, 5:21 a.m. OK MS C++ 2017 TESTS 99 31 0 1400
59089613 vjudge1 A Aug. 19, 2019, 12:19 p.m. OK MS C++ 2017 TESTS 99 31 0 1400
60901907 vjudge3 A Sept. 19, 2019, 10:32 p.m. OK MS C++ 2017 TESTS 99 31 0 1400
66554421 HishamDroubi A Dec. 9, 2019, 4:10 p.m. OK MS C++ 2017 TESTS 99 31 0 1400
51673568 Souseisaki A March 22, 2019, 9:20 a.m. OK MS C++ 2017 TESTS 99 31 0 1400
55929302 petko_mitkov A June 22, 2019, 10:43 a.m. OK MS C++ 2017 TESTS 99 31 0 1400
59070796 liv23333 A Aug. 19, 2019, 4:37 a.m. OK MS C++ 2017 TESTS 99 31 0 1400
64310424 KATAYPEPE A Nov. 5, 2019, 12:36 p.m. OK MS C++ 2017 TESTS 99 31 307200 1400
68388912 Fire_ass A Jan. 8, 2020, 7:36 a.m. OK MS C++ 2017 TESTS 99 31 307200 1400
48302709 moballack A Jan. 12, 2019, 5:50 p.m. OK Node.js TESTS 99 156 409600 1400
48082380 pirvu.catalin94 A Jan. 8, 2019, 8:49 a.m. OK Node.js TESTS 99 187 512000 1400
45748640 sk0 A Nov. 14, 2018, 9:57 p.m. OK Ocaml TESTS 99 30 0 1400
45758998 ElIlia A Nov. 15, 2018, 7:54 a.m. OK PascalABC.NET TESTS 99 46 0 1400
45790367 VladGAH A Nov. 16, 2018, 6:33 a.m. OK PascalABC.NET TESTS 99 62 921600 1400
55537996 Houy3 A June 13, 2019, 5:38 p.m. OK PascalABC.NET TESTS 99 311 307200 1400
45744848 rsFalse A Nov. 14, 2018, 7:41 p.m. OK Perl TESTS 99 31 0 1400
45746060 rsFalse A Nov. 14, 2018, 8:13 p.m. OK Perl TESTS 99 46 0 1400
45746859 mayakin A Nov. 14, 2018, 8:36 p.m. OK PHP TESTS 99 46 409600 1400
45753976 latsyrc1123 A Nov. 15, 2018, 4:10 a.m. OK PyPy 2 TESTS 99 124 0 1400
48295355 soumyasarkar1998 A Jan. 12, 2019, 2:21 p.m. OK PyPy 2 TESTS 99 124 0 1400
54743748 kaif_7 A May 28, 2019, 9:27 a.m. OK PyPy 2 TESTS 99 124 0 1400
45738495 YESMAths A Nov. 14, 2018, 5:25 p.m. OK PyPy 2 TESTS 99 124 204800 1400
45767094 wangkan2001 A Nov. 15, 2018, 12:42 p.m. OK PyPy 2 TESTS 99 139 0 1400
45802611 godmar A Nov. 16, 2018, 2:08 p.m. OK PyPy 2 TESTS 99 140 0 1400
45742145 c1729 A Nov. 14, 2018, 6:56 p.m. OK PyPy 2 TESTS 99 140 0 1400
46704467 apoorv1999 A Dec. 7, 2018, 6:03 a.m. OK PyPy 2 TESTS 99 171 0 1400
45885468 johnzeng A Nov. 17, 2018, 3:48 p.m. OK PyPy 3 TESTS 99 124 0 1400
45781850 omarnvidia A Nov. 15, 2018, 8:29 p.m. OK PyPy 3 TESTS 99 139 0 1400
45753521 akk5597 A Nov. 15, 2018, 3:46 a.m. OK PyPy 3 TESTS 99 139 0 1400
45745283 LordVader A Nov. 14, 2018, 7:51 p.m. OK PyPy 3 TESTS 99 139 0 1400
45752368 ARSHIA A Nov. 15, 2018, 2:37 a.m. OK PyPy 3 TESTS 99 139 102400 1400
55700733 vjudge3 A June 18, 2019, 3:51 a.m. OK PyPy 3 TESTS 99 140 0 1400
48541819 toysheeyeyraku A Jan. 18, 2019, 5:08 p.m. OK PyPy 3 TESTS 99 140 0 1400
47685783 kgmkr00001 A Dec. 29, 2018, 2:43 p.m. OK PyPy 3 TESTS 99 140 0 1400
46263511 arikpamnani A Nov. 26, 2018, 10:39 p.m. OK PyPy 3 TESTS 99 140 0 1400
45789481 limitbreaker37 A Nov. 16, 2018, 5:47 a.m. OK PyPy 3 TESTS 99 140 0 1400
45752224 aeternalis1 A Nov. 15, 2018, 2:28 a.m. OK Python 2 TESTS 99 170 0 1400
48716837 ssk497 A Jan. 22, 2019, 11:41 a.m. OK Python 2 TESTS 99 171 0 1400
46264100 nealzane A Nov. 26, 2018, 11:42 p.m. OK Python 2 TESTS 99 171 0 1400
46053665 noob77777 A Nov. 22, 2018, 9:33 a.m. OK Python 2 TESTS 99 171 0 1400
45757389 Himanshuteli A Nov. 15, 2018, 6:54 a.m. OK Python 2 TESTS 99 171 0 1400
45747990 psaini A Nov. 14, 2018, 9:22 p.m. OK Python 2 TESTS 99 171 0 1400
45742125 SoSooding A Nov. 14, 2018, 6:56 p.m. OK Python 2 TESTS 99 171 0 1400
59398119 mithilaCoder kaif_7 aditya_pareek A Aug. 24, 2019, 11:06 a.m. OK Python 2 TESTS 99 186 0 1400
45742715 leal A Nov. 14, 2018, 7:03 p.m. OK Python 2 TESTS 99 187 0 1400
45786464 Babyjjy A Nov. 16, 2018, 2:20 a.m. OK Python 2 TESTS 99 249 0 1400
63897680 vjudge2 A Oct. 31, 2019, 3:13 a.m. OK Python 3 TESTS 99 109 0 1400
63879272 vjudge4 A Oct. 30, 2019, 8:08 p.m. OK Python 3 TESTS 99 109 0 1400
63879121 vjudge1 A Oct. 30, 2019, 8:05 p.m. OK Python 3 TESTS 99 109 0 1400
63875978 vjudge2 A Oct. 30, 2019, 7:01 p.m. OK Python 3 TESTS 99 109 0 1400
60900647 vjudge1 A Sept. 19, 2019, 9:13 p.m. OK Python 3 TESTS 99 109 0 1400
58865159 XAMRMAX A Aug. 15, 2019, 1:05 p.m. OK Python 3 TESTS 99 109 0 1400
55306906 Dr.Mentalist A June 8, 2019, 3:03 p.m. OK Python 3 TESTS 99 109 0 1400
53987851 Annvv A May 11, 2019, 10:44 a.m. OK Python 3 TESTS 99 109 0 1400
53876756 ashok123 A May 8, 2019, 12:24 p.m. OK Python 3 TESTS 99 109 0 1400
51563511 ragnar7 A March 20, 2019, 8:50 a.m. OK Python 3 TESTS 99 109 0 1400
45735707 geckods A Nov. 14, 2018, 5:09 p.m. OK Ruby TESTS 99 62 204800 1400
45776064 yakamoto A Nov. 15, 2018, 5:08 p.m. OK Scala TESTS 99 421 0 1400
45947040 AlexProk A Nov. 19, 2018, 1:47 a.m. OK Scala TESTS 99 421 0 1400

remove filters

Back to search problems