Codeforces Round 683 (Div. 1, by Meet IT)

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
1446 Codeforces Round 683 (Div. 1, by Meet IT) FINISHED False 9000 134753090 Nov. 15, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1479 ) D2 Frequency Problem (Hard Version) PROGRAMMING data structures greedy

B"This is the hard version of the problem. The difference between the versions is in the constraints on the array elements. You can make hacks only if all versions of the problem are solved. You are given an array [a_1, a_2, ... , a_n] . Your goal is to find the length of the longest subarray of this array such that the most frequent value in it is not unique. In other words, you are looking for a subarray such that if the most frequent value occurs f times in this subarray, then at least 2 different values should occur exactly f times. An array c is a subarray of an array d if c can be obtained from d by deletion of several (possibly, zero or all) elements from the beginning and several (possibly, zero or all) elements from the end. The first line contains a single integer n ( 1 <= n <= 200 ,000 ) -- the length of the array. The second line contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= n ) -- elements of the array. You should output exactly one integer -- the length of the longest subarray of the array whose most frequent value is not unique. If there is no such subarray, output 0 . In the first sample, the subarray [1, 1, 2, 2, 3, 3] is good, but [1, 1, 2, 2, 3, 3, 3] isn't: in the latter there are 3 occurrences of number 3 , and no other element appears 3 times. "...

Tutorials

E

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
98488909 Isonan D2 Nov. 15, 2020, 4:44 p.m. OK GNU C++11 TESTS 86 514 35430400
98515960 Scarlet_Hypoc D2 Nov. 16, 2020, 3:27 a.m. OK GNU C++11 TESTS 86 826 4608000
98483512 fanache99 D2 Nov. 15, 2020, 4:20 p.m. OK GNU C++11 TESTS 86 1107 9625600
98495376 xing89qs D2 Nov. 15, 2020, 5:42 p.m. OK GNU C++11 TESTS 86 1419 9625600
98512842 AquaMoon D2 Nov. 16, 2020, 1:37 a.m. OK GNU C++11 TESTS 86 1497 19865600
98516326 brute_forceCE D2 Nov. 16, 2020, 3:39 a.m. OK GNU C++11 TESTS 86 1497 20070400
98470769 duality D2 Nov. 15, 2020, 3:35 p.m. OK GNU C++11 TESTS 86 1933 10649600
98519198 ugly2333 D2 Nov. 16, 2020, 5 a.m. OK GNU C++14 TESTS 86 109 10240000
98512750 lavenderwithbluish D2 Nov. 16, 2020, 1:33 a.m. OK GNU C++14 TESTS 86 109 11366400
98498471 dlalswp25 D2 Nov. 15, 2020, 6:19 p.m. OK GNU C++14 TESTS 86 234 263270400
98520497 Potassium D2 Nov. 16, 2020, 5:28 a.m. OK GNU C++14 TESTS 86 249 15769600
98509124 SuperJ6 D2 Nov. 15, 2020, 10:48 p.m. OK GNU C++14 TESTS 86 280 21299200
98496258 chenkuowen D2 Nov. 15, 2020, 5:51 p.m. OK GNU C++14 TESTS 86 311 25600000
98491086 receed D2 Nov. 15, 2020, 4:55 p.m. OK GNU C++14 TESTS 86 373 9011200
98517587 purinliang D2 Nov. 16, 2020, 4:19 a.m. OK GNU C++14 TESTS 86 373 23040000
98498694 nhho D2 Nov. 15, 2020, 6:23 p.m. OK GNU C++14 TESTS 86 483 17920000
98497313 zeliboba D2 Nov. 15, 2020, 6:03 p.m. OK GNU C++14 TESTS 86 499 22220800
98508752 Whalanator D2 Nov. 15, 2020, 10:33 p.m. OK GNU C++17 TESTS 86 93 13004800
98482171 kefaa2 D2 Nov. 15, 2020, 4:15 p.m. OK GNU C++17 TESTS 86 155 10649600
98486329 Amoo_Safar D2 Nov. 15, 2020, 4:33 p.m. OK GNU C++17 TESTS 86 156 13824000
98507213 MURAT_ECEM_EKICI D2 Nov. 15, 2020, 9:35 p.m. OK GNU C++17 TESTS 86 171 37478400
98510279 Zweib D2 Nov. 15, 2020, 11:45 p.m. OK GNU C++17 TESTS 86 187 17715200
98479038 mango_lassi D2 Nov. 15, 2020, 4:02 p.m. OK GNU C++17 TESTS 86 218 7372800
98512456 lukkka D2 Nov. 16, 2020, 1:21 a.m. OK GNU C++17 TESTS 86 218 114585600
98504027 TadijaSebez D2 Nov. 15, 2020, 8:02 p.m. OK GNU C++17 TESTS 86 264 9523200
98488185 Farhod_Farmon D2 Nov. 15, 2020, 4:41 p.m. OK GNU C++17 TESTS 86 264 16691200
98514057 generic_placeholder_name D2 Nov. 16, 2020, 2:27 a.m. OK GNU C++17 TESTS 86 311 13209600
98518570 dqa2020 D2 Nov. 16, 2020, 4:45 a.m. OK GNU C++17 (64) TESTS 86 124 12083200
98515571 al13n D2 Nov. 16, 2020, 3:16 a.m. OK GNU C++17 (64) TESTS 86 139 8704000
98479602 ecnerwala D2 Nov. 15, 2020, 4:05 p.m. OK GNU C++17 (64) TESTS 86 186 12083200
98464291 maroonrk D2 Nov. 15, 2020, 3:17 p.m. OK GNU C++17 (64) TESTS 86 186 18329600
98494861 natsugiri D2 Nov. 15, 2020, 5:39 p.m. OK GNU C++17 (64) TESTS 86 187 12902400
98464495 ksun48 D2 Nov. 15, 2020, 3:17 p.m. OK GNU C++17 (64) TESTS 86 234 16691200
98505071 saketh D2 Nov. 15, 2020, 8:30 p.m. OK GNU C++17 (64) TESTS 86 248 30003200
98507195 risujiroh D2 Nov. 15, 2020, 9:34 p.m. OK GNU C++17 (64) TESTS 86 358 13721600
98494860 amethyst0 D2 Nov. 15, 2020, 5:39 p.m. OK GNU C++17 (64) TESTS 86 358 16076800
98499790 LJC00118 D2 Nov. 15, 2020, 6:40 p.m. OK GNU C++17 (64) TESTS 86 405 25702400
98489777 SecondThread D2 Nov. 15, 2020, 4:48 p.m. OK Java 8 TESTS 86 561 30208000
98513377 cwise D2 Nov. 16, 2020, 2:01 a.m. OK Java 8 TESTS 86 1918 0
98485782 gnomina007 D2 Nov. 15, 2020, 4:30 p.m. OK MS C++ 2017 TESTS 86 779 6860800

remove filters

Back to search problems