Codeforces Round 686 (Div. 3)

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
1454 Codeforces Round 686 (Div. 3) FINISHED False 7200 125594699 Nov. 24, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4089 ) F Array Partition PROGRAMMING binary search brute force data structures greedy two pointers

B'You are given an array a consisting of n integers. Let min(l, r) be the minimum value among a_l, a_{l + 1}, ldots, a_r and max(l, r) be the maximum value among a_l, a_{l + 1}, ldots, a_r . Your task is to choose three positive (greater than 0 ) integers x , y and z such that: In other words, you have to split the array a into three consecutive non-empty parts that cover the whole array and the maximum in the first part equals the minimum in the second part and equals the maximum in the third part (or determine it is impossible to find such a partition). Among all such triples (partitions), you can choose any. You have to answer t independent test cases. The first line of the input contains one integer t ( 1 <= t <= 2 cdot 10^4 ) -- the number of test cases. Then t test cases follow. The first line of the test case contains one integer n ( 3 <= n <= 2 cdot 10^5 ) -- the length of a . The second line of the test case contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= 10^9 ), where a_i is the i -th element of a . It is guaranteed that the sum of n does not exceed 2 cdot 10^5 ( sum n <= 2 cdot 10^5 ). For each test case, print the answer: NO in the only line if there is no such partition of a that satisfies the conditions from the problem statement. Otherwise, print YES in the first line and three integers x , y and z ( x + y + z = n ) in the second line. If there are several answers, you can print any. '...

Tutorials

Codeforces Round #686 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
99554579 quangngg F Nov. 25, 2020, 11:45 a.m. OK FPC TESTS 72 186 74649600
99605728 mshiny_111 F Nov. 26, 2020, 3:52 a.m. OK GNU C11 TESTS 72 109 2457600
99532738 19yjy F Nov. 25, 2020, 7:19 a.m. OK GNU C++11 TESTS 72 62 2457600
99568831 yan_qiu_ynlchrz F Nov. 25, 2020, 2:30 p.m. OK GNU C++11 TESTS 72 62 3174400
99534231 BelowLuminous F Nov. 25, 2020, 7:36 a.m. OK GNU C++11 TESTS 72 78 2457600
99532430 fishcathu. F Nov. 25, 2020, 7:15 a.m. OK GNU C++11 TESTS 72 78 3993600
99531076 fishcathu. F Nov. 25, 2020, 6:59 a.m. OK GNU C++11 TESTS 72 78 3993600
99532825 fishcathu. F Nov. 25, 2020, 7:20 a.m. OK GNU C++11 TESTS 72 78 3993600
99555438 XiaoTaoTao F Nov. 25, 2020, 11:55 a.m. OK GNU C++11 TESTS 72 78 35328000
99519659 GOOGLE_ F Nov. 25, 2020, 3:47 a.m. OK GNU C++11 TESTS 72 93 6451200
99575263 dongyeguiwu00 F Nov. 25, 2020, 3:30 p.m. OK GNU C++11 TESTS 72 108 17100800
99566567 Charonxu F Nov. 25, 2020, 2:02 p.m. OK GNU C++11 TESTS 72 109 8806400
99594332 Ares F Nov. 25, 2020, 8:17 p.m. OK GNU C++14 TESTS 72 78 3993600
99594403 Z-Saber F Nov. 25, 2020, 8:19 p.m. OK GNU C++14 TESTS 72 78 3993600
99567442 funer F Nov. 25, 2020, 2:13 p.m. OK GNU C++14 TESTS 72 93 1638400
99518499 yeeeet F Nov. 25, 2020, 3:19 a.m. OK GNU C++14 TESTS 72 93 3993600
99529890 Y_Y F Nov. 25, 2020, 6:45 a.m. OK GNU C++14 TESTS 72 93 11264000
99556337 moustafa.mk F Nov. 25, 2020, 12:06 p.m. OK GNU C++14 TESTS 72 93 16691200
99513237 Temirulan F Nov. 25, 2020, 12:30 a.m. OK GNU C++14 TESTS 72 93 17715200
99577762 Dan13llljws F Nov. 25, 2020, 3:53 p.m. OK GNU C++14 TESTS 72 93 19353600
99528798 skizajurrahaman F Nov. 25, 2020, 6:33 a.m. OK GNU C++14 TESTS 72 93 24064000
99560204 NaimSS F Nov. 25, 2020, 12:46 p.m. OK GNU C++14 TESTS 72 108 15872000
99574804 benson0402 F Nov. 25, 2020, 3:26 p.m. OK GNU C++17 TESTS 72 78 2355200
99576085 X-O__O-X F Nov. 25, 2020, 3:37 p.m. OK GNU C++17 TESTS 72 78 2457600
99511899 Harry122 F Nov. 24, 2020, 11:24 p.m. OK GNU C++17 TESTS 72 93 2355200
99514513 Lawali F Nov. 25, 2020, 1:24 a.m. OK GNU C++17 TESTS 72 93 3174400
99535815 magikarp420 F Nov. 25, 2020, 7:56 a.m. OK GNU C++17 TESTS 72 93 3993600
99523380 Namazabi12 F Nov. 25, 2020, 5:02 a.m. OK GNU C++17 TESTS 72 93 3993600
99540726 3liAckerman F Nov. 25, 2020, 8:57 a.m. OK GNU C++17 TESTS 72 93 3993600
99545985 DmitriyPuchkov F Nov. 25, 2020, 10 a.m. OK GNU C++17 TESTS 72 93 4812800
99565927 Dlian F Nov. 25, 2020, 1:55 p.m. OK GNU C++17 TESTS 72 93 4812800
99513350 Stimsly F Nov. 25, 2020, 12:35 a.m. OK GNU C++17 TESTS 72 93 5017600
99581863 knayan F Nov. 25, 2020, 4:41 p.m. OK GNU C++17 (64) TESTS 72 62 2457600
99523647 nishank.suresh F Nov. 25, 2020, 5:05 a.m. OK GNU C++17 (64) TESTS 72 62 5222400
99516463 pacha2880 F Nov. 25, 2020, 2:29 a.m. OK GNU C++17 (64) TESTS 72 62 19251200
99558378 Arrebol F Nov. 25, 2020, 12:27 p.m. OK GNU C++17 (64) TESTS 72 77 4915200
99585003 vk48962713 F Nov. 25, 2020, 5:26 p.m. OK GNU C++17 (64) TESTS 72 77 9011200
99531075 jainbot27 F Nov. 25, 2020, 6:59 a.m. OK GNU C++17 (64) TESTS 72 77 15872000
99552166 june_waves F Nov. 25, 2020, 11:17 a.m. OK GNU C++17 (64) TESTS 72 77 17715200
99510425 12tqian F Nov. 24, 2020, 10:08 p.m. OK GNU C++17 (64) TESTS 72 78 16691200
99550475 june_waves F Nov. 25, 2020, 10:57 a.m. OK GNU C++17 (64) TESTS 72 78 17715200
99516478 pacha2880 F Nov. 25, 2020, 2:30 a.m. OK GNU C++17 (64) TESTS 72 78 19251200
99596781 sunnyguan F Nov. 25, 2020, 9:37 p.m. OK Java 11 TESTS 72 358 4608000
99523501 blackBird F Nov. 25, 2020, 5:04 a.m. OK Java 11 TESTS 72 483 55705600
99517251 mesumit F Nov. 25, 2020, 2:50 a.m. OK Java 11 TESTS 72 545 73728000
99562780 enraged F Nov. 25, 2020, 1:16 p.m. OK Java 11 TESTS 72 576 48230400
99561129 nirvana_rsc F Nov. 25, 2020, 12:57 p.m. OK Java 11 TESTS 72 577 45056000
99560824 nirvana_rsc F Nov. 25, 2020, 12:53 p.m. OK Java 11 TESTS 72 577 45056000
99562949 enraged F Nov. 25, 2020, 1:19 p.m. OK Java 11 TESTS 72 577 48230400
99597826 capsule F Nov. 25, 2020, 10:24 p.m. OK Java 11 TESTS 72 685 19148800
99516509 JunBinLiang F Nov. 25, 2020, 2:31 a.m. OK Java 11 TESTS 72 733 42700800
99510807 mphillotry F Nov. 24, 2020, 10:25 p.m. OK Java 11 TESTS 72 1122 41881600
99601174 derrick20 F Nov. 26, 2020, 1:20 a.m. OK Java 8 TESTS 72 155 0
99601396 derrick20 F Nov. 26, 2020, 1:30 a.m. OK Java 8 TESTS 72 217 0
99596552 derrick20 F Nov. 25, 2020, 9:29 p.m. OK Java 8 TESTS 72 248 74342400
99517959 lzhang F Nov. 25, 2020, 3:07 a.m. OK Java 8 TESTS 72 296 35737600
99531430 krishnacharanmrp123 F Nov. 25, 2020, 7:04 a.m. OK Java 8 TESTS 72 311 84684800
99595907 derrick20 F Nov. 25, 2020, 9:03 p.m. OK Java 8 TESTS 72 327 17612800
99608098 zhongzh13 F Nov. 26, 2020, 5:02 a.m. OK Java 8 TESTS 72 405 5120000
99510360 2020akadaver F Nov. 24, 2020, 10:05 p.m. OK Java 8 TESTS 72 514 21196800
99543569 2u_my_light F Nov. 25, 2020, 9:30 a.m. OK Java 8 TESTS 72 530 20684800
99599367 robinz62 F Nov. 25, 2020, 11:48 p.m. OK Java 8 TESTS 72 592 37580800
99578148 sid9406 F Nov. 25, 2020, 3:57 p.m. OK Kotlin TESTS 72 342 30105600
99534706 horvat.kamca F Nov. 25, 2020, 7:42 a.m. OK Kotlin TESTS 72 701 64614400
99511594 getN1ght F Nov. 24, 2020, 11:08 p.m. OK MS C++ 2017 TESTS 72 234 7168000
99586326 Megalitum F Nov. 25, 2020, 5:45 p.m. OK MS C++ 2017 TESTS 72 373 13619200
99538962 SlowDecay F Nov. 25, 2020, 8:37 a.m. OK Node.js TESTS 72 358 50483200
99533985 SlowDecay F Nov. 25, 2020, 7:33 a.m. OK Node.js TESTS 72 373 60108800
99583423 aberent F Nov. 25, 2020, 5:04 p.m. OK PyPy 3 TESTS 72 420 19456000
99586910 __eRRor__ F Nov. 25, 2020, 5:55 p.m. OK PyPy 3 TESTS 72 498 32972800
99586838 erickjohnross F Nov. 25, 2020, 5:54 p.m. OK PyPy 3 TESTS 72 530 28467200
99547001 bose_coder F Nov. 25, 2020, 10:12 a.m. OK PyPy 3 TESTS 72 608 37990400
99546891 bose_coder F Nov. 25, 2020, 10:11 a.m. OK PyPy 3 TESTS 72 670 47411200
99514439 Satwik_Tiwari F Nov. 25, 2020, 1:21 a.m. OK PyPy 3 TESTS 72 748 40448000
99511443 Satwik_Tiwari F Nov. 24, 2020, 10:58 p.m. OK PyPy 3 TESTS 72 919 47411200
99551333 reddevil100 F Nov. 25, 2020, 11:07 a.m. OK PyPy 3 TESTS 72 998 52019200
99585150 erickjohnross F Nov. 25, 2020, 5:28 p.m. OK PyPy 3 TESTS 72 1138 27955200
99585342 erickjohnross F Nov. 25, 2020, 5:32 p.m. OK PyPy 3 TESTS 72 1169 27955200
99594917 optozorax F Nov. 25, 2020, 8:32 p.m. OK Rust TESTS 72 670 5529600

remove filters

Back to search problems