Codeforces Global Round 17

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
1610 Codeforces Global Round 17 FINISHED False 10800 94145099 Nov. 23, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1691 ) E AmShZ and G.O.A.T. PROGRAMMING binary search brute force greedy math

B"Let's call an array of k integers c_1, c_2, ldots, c_k terrible, if the following condition holds: Let AVG be the frac{c_1 + c_2 + ldots + c_k}{k} (the average of all the elements of the array, it doesn't have to be integer). Then the number of elements of the array which are bigger than AVG should be strictly larger than the number of elements of the array which are smaller than AVG . Note that elements equal to AVG don't count. For example c = {1, 4, 4, 5, 6 } is terrible because AVG = 4.0 and 5 -th and 4 -th elements are greater than AVG and 1 -st element is smaller than AVG . Let's call an array of m integers b_1, b_2, ldots, b_m bad, if at least one of its non-empty subsequences is terrible, and good otherwise. You are given an array of n integers a_1, a_2, ldots, a_n . Find the minimum number of elements that you have to delete from it to obtain a good array. An array is a subsequence of another array if it can be obtained from it by deletion of several (possibly, zero or all) elements. The first line contains an integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The description of test cases follows. The first line of each test case contains a single integer n ( 2 <= n <= 2 cdot 10^5 ) -- the size of a . The second line of each testcase contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= 10^9 ) -- elements of array a . In each testcase for any 1 <= i lt n it is guaranteed that a_i <= a_{i+1} . It is guaranteed that the sum of n over all testcases doesn't exceed 2 cdot 10^5 . For each testcase, print the minimum number of elements that you have to delete from it to obtain a good array. In the first sample, the array a is already good. In the second sample, it's enough to delete 1 , obtaining array [4, 4, 5, 6] , which is good. "...

Tutorials

Codeforces Global Round 17 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
136671295 kimjihoon E Nov. 23, 2021, 4:49 p.m. OK GNU C++14 TESTS 40 78 819200
136704854 axp E Nov. 24, 2021, 4:56 a.m. OK GNU C++14 TESTS 40 155 819200
136672962 yao11617 E Nov. 23, 2021, 4:58 p.m. OK GNU C++14 TESTS 40 171 1024000
136705581 ClCN E Nov. 24, 2021, 5:09 a.m. OK GNU C++14 TESTS 40 171 2867200
136706712 _ztyqwq E Nov. 24, 2021, 5:29 a.m. OK GNU C++14 TESTS 40 202 819200
136675892 LZDQ E Nov. 23, 2021, 5:15 p.m. OK GNU C++14 TESTS 40 202 819200
136671907 DirectCurrent E Nov. 23, 2021, 4:52 p.m. OK GNU C++14 TESTS 40 202 819200
136665636 WhyWhy E Nov. 23, 2021, 4:21 p.m. OK GNU C++14 TESTS 40 202 1126400
136692144 Samaun E Nov. 23, 2021, 9:43 p.m. OK GNU C++14 TESTS 40 202 7987200
136670907 newbin E Nov. 23, 2021, 4:47 p.m. OK GNU C++14 TESTS 40 217 819200
136696026 lucccff E Nov. 24, 2021, 12:52 a.m. OK GNU C++17 TESTS 40 124 1638400
136666658 mip182 E Nov. 23, 2021, 4:25 p.m. OK GNU C++17 TESTS 40 171 2457600
136702115 WA_King E Nov. 24, 2021, 3:55 a.m. OK GNU C++17 TESTS 40 187 819200
136674475 lyons E Nov. 23, 2021, 5:07 p.m. OK GNU C++17 TESTS 40 187 819200
136681859 Aging1986 E Nov. 23, 2021, 6:06 p.m. OK GNU C++17 TESTS 40 202 819200
136681449 KULIKOLD E Nov. 23, 2021, 6:01 p.m. OK GNU C++17 TESTS 40 202 819200
136677886 _FireGhost_ E Nov. 23, 2021, 5:27 p.m. OK GNU C++17 TESTS 40 202 819200
136693557 PetroTarnavskyi E Nov. 23, 2021, 10:45 p.m. OK GNU C++17 TESTS 40 217 819200
136680177 serotonin E Nov. 23, 2021, 5:50 p.m. OK GNU C++17 TESTS 40 217 1228800
136676335 balakrishnan E Nov. 23, 2021, 5:18 p.m. OK GNU C++17 TESTS 40 217 59904000
136680285 liangjiawen2007 E Nov. 23, 2021, 5:51 p.m. OK GNU C++17 (64) TESTS 40 139 2867200
136679061 kishtarn E Nov. 23, 2021, 5:34 p.m. OK GNU C++17 (64) TESTS 40 140 1638400
136678014 kulmak41 E Nov. 23, 2021, 5:28 p.m. OK GNU C++17 (64) TESTS 40 155 5017600
136670430 jeroenodb E Nov. 23, 2021, 4:44 p.m. OK GNU C++17 (64) TESTS 40 186 819200
136702207 Kaizyn E Nov. 24, 2021, 3:57 a.m. OK GNU C++17 (64) TESTS 40 187 819200
136672031 PipelinePunch E Nov. 23, 2021, 4:53 p.m. OK GNU C++17 (64) TESTS 40 187 819200
136666949 Siberian E Nov. 23, 2021, 4:27 p.m. OK GNU C++17 (64) TESTS 40 187 1638400
136665723 yukihana0416 E Nov. 23, 2021, 4:21 p.m. OK GNU C++17 (64) TESTS 40 187 4812800
136675220 ShadowLight E Nov. 23, 2021, 5:11 p.m. OK GNU C++17 (64) TESTS 40 187 10752000
136702260 Nero E Nov. 24, 2021, 3:58 a.m. OK GNU C++17 (64) TESTS 40 202 819200
136670932 Arch_of_Triumph E Nov. 23, 2021, 4:47 p.m. OK GNU C++20 (64) TESTS 40 124 819200
136686351 magnus.hegdahl E Nov. 23, 2021, 7:15 p.m. OK GNU C++20 (64) TESTS 40 124 1638400
136699040 Lemonade255 E Nov. 24, 2021, 2:40 a.m. OK GNU C++20 (64) TESTS 40 140 819200
136675915 achvanov E Nov. 23, 2021, 5:15 p.m. OK GNU C++20 (64) TESTS 40 140 819200
136674090 6aren E Nov. 23, 2021, 5:05 p.m. OK GNU C++20 (64) TESTS 40 171 1638400
136668464 HolyK E Nov. 23, 2021, 4:34 p.m. OK GNU C++20 (64) TESTS 40 187 819200
136662842 l1ll5 E Nov. 23, 2021, 4:09 p.m. OK GNU C++20 (64) TESTS 40 187 819200
136669168 HollwoQ_Pelw E Nov. 23, 2021, 4:37 p.m. OK GNU C++20 (64) TESTS 40 187 1638400
136678688 hat E Nov. 23, 2021, 5:32 p.m. OK GNU C++20 (64) TESTS 40 187 3993600
136702397 hotboy2703 E Nov. 24, 2021, 4:02 a.m. OK GNU C++20 (64) TESTS 40 202 819200
136666205 procrastinate7 E Nov. 23, 2021, 4:23 p.m. OK Java 11 TESTS 40 452 0
136676366 Dukkha E Nov. 23, 2021, 5:18 p.m. OK Java 11 TESTS 40 685 0
136683517 kencho8128 E Nov. 23, 2021, 6:28 p.m. OK Java 11 TESTS 40 935 12390400
136667975 SecondThread E Nov. 23, 2021, 4:32 p.m. OK Java 8 TESTS 40 748 4608000
136685813 arvindf232 E Nov. 23, 2021, 7:05 p.m. OK Kotlin 1.4 TESTS 40 452 6041600
136677317 russian_proger E Nov. 23, 2021, 5:24 p.m. OK MS C++ 2017 TESTS 40 405 1638400
136693858 OLOGY E Nov. 23, 2021, 11 p.m. OK PyPy 2 TESTS 40 655 13824000
136671695 NecroSean38 E Nov. 23, 2021, 4:51 p.m. OK PyPy 3 TESTS 40 701 18841600
136683637 hxu10 E Nov. 23, 2021, 6:30 p.m. OK PyPy 3 TESTS 40 717 19558400
136689628 xincept E Nov. 23, 2021, 8:23 p.m. OK PyPy 3 TESTS 40 748 15667200
136668010 nimiranio E Nov. 23, 2021, 4:32 p.m. OK PyPy 3 TESTS 40 779 16793600
136684063 FlakeLCR E Nov. 23, 2021, 6:36 p.m. OK PyPy 3-64 TESTS 40 779 27648000
136670813 conqueror_of_tourist E Nov. 23, 2021, 4:46 p.m. OK PyPy 3-64 TESTS 40 795 29696000
136684963 titia E Nov. 23, 2021, 6:50 p.m. OK PyPy 3-64 TESTS 40 842 34304000
136665454 chinerist E Nov. 23, 2021, 4:20 p.m. OK PyPy 3-64 TESTS 40 982 37683200

remove filters

Back to search problems