Codeforces Round 737 (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
1557 Codeforces Round 737 (Div. 2) FINISHED False 7200 108833111 Aug. 9, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 28144 ) A Ezzat and Two Subsequences PROGRAMMING brute force math

B"Ezzat has an array of n integers (maybe negative). He wants to split it into two non-empty subsequences a and b , such that every element from the array belongs to exactly one subsequence, and the value of f(a) + f(b) is the maximum possible value, where f(x) is the average of the subsequence x . A sequence x is a subsequence of a sequence y if x can be obtained from y by deletion of several (possibly, zero or all) elements. The average of a subsequence is the sum of the numbers of this subsequence divided by the size of the subsequence. For example, the average of [1,5,6] is (1+5+6)/3 = 12/3 = 4 , so f([1,5,6]) = 4 . The first line contains a single integer t ( 1 <= t <= 10^3 ) -- the number of test cases. Each test case consists of two lines. The first line contains a single integer n ( 2 <= n <= 10^5 ). The second line contains n integers a_1, a_2, ldots, a_n ( -10^9 <= a_i <= 10^9 ). It is guaranteed that the sum of n over all test cases does not exceed 3 cdot10^5 . For each test case, print a single value -- the maximum value that Ezzat can achieve. Your answer is considered correct if its absolute or relative error does not exceed 10^{-6} . Formally, let your answer be a , and the jury's answer be b . Your answer is accepted if and only if frac{|a - b|}{ max{(1, |b|)}} <= 10^{-6} . In the first test case, the array is [3, 1, 2] . These are all the possible ways to split this array: In the second test case, the array is [-7, -6, -6] . These are all the possible ways to split this array: "...

Tutorials

Codeforces Round #737 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
125416306 gxlois A Aug. 9, 2021, 7:17 p.m. OK D TESTS 11 140 10752000
125416847 dhikshith12 A Aug. 9, 2021, 7:26 p.m. OK GNU C11 TESTS 11 62 3686400
125411696 RedJohn2 A Aug. 9, 2021, 6:19 p.m. OK GNU C11 TESTS 11 62 3686400
125440129 wsw0128 A Aug. 10, 2021, 4:18 a.m. OK GNU C11 TESTS 11 62 4096000
125399935 20101111 A Aug. 9, 2021, 4:30 p.m. OK GNU C11 TESTS 11 62 4096000
125427799 murali_33 A Aug. 10, 2021, 12:25 a.m. OK GNU C11 TESTS 11 62 4915200
125430456 cool_ritik A Aug. 10, 2021, 1:32 a.m. OK GNU C11 TESTS 11 77 4505600
125428457 blue_planet A Aug. 10, 2021, 12:44 a.m. OK GNU C11 TESTS 11 77 4505600
125427906 Tom66 A Aug. 10, 2021, 12:27 a.m. OK GNU C++11 TESTS 11 30 3788800
125427499 LinkZelda A Aug. 10, 2021, 12:16 a.m. OK GNU C++11 TESTS 11 31 3686400
125435782 w2321 A Aug. 10, 2021, 3:06 a.m. OK GNU C++11 TESTS 11 31 3686400
125427901 bkifhr8 A Aug. 10, 2021, 12:27 a.m. OK GNU C++11 TESTS 11 31 3788800
125440457 pufanyi A Aug. 10, 2021, 4:24 a.m. OK GNU C++11 TESTS 11 31 3891200
125428211 wjx307816794 A Aug. 10, 2021, 12:37 a.m. OK GNU C++11 TESTS 11 31 3891200
125427469 wzsyyh A Aug. 10, 2021, 12:15 a.m. OK GNU C++11 TESTS 11 31 3891200
125438763 huayouhan A Aug. 10, 2021, 3:56 a.m. OK GNU C++11 TESTS 11 31 3891200
125434987 p1easun A Aug. 10, 2021, 2:54 a.m. OK GNU C++11 TESTS 11 31 3891200
125437668 xyizd A Aug. 10, 2021, 3:38 a.m. OK GNU C++11 TESTS 11 31 4300800
125424566 death_note_ A Aug. 9, 2021, 10:26 p.m. OK GNU C++14 TESTS 11 62 3686400
125437414 QiuHong A Aug. 10, 2021, 3:33 a.m. OK GNU C++14 TESTS 11 62 7782400
125429277 SF-Manman A Aug. 10, 2021, 1:04 a.m. OK GNU C++14 TESTS 11 77 3686400
125440443 bijalwan_2000 A Aug. 10, 2021, 4:23 a.m. OK GNU C++14 TESTS 11 77 4096000
125410937 Mr_Rex A Aug. 9, 2021, 6:11 p.m. OK GNU C++14 TESTS 11 77 4096000
125444651 vedant_10 A Aug. 10, 2021, 5:29 a.m. OK GNU C++14 TESTS 11 77 4096000
125410412 DuncanKnight A Aug. 9, 2021, 6:06 p.m. OK GNU C++14 TESTS 11 77 4505600
125405600 Epi_con A Aug. 9, 2021, 5:29 p.m. OK GNU C++14 TESTS 11 77 4505600
125405900 Epimaxipressin A Aug. 9, 2021, 5:31 p.m. OK GNU C++14 TESTS 11 77 4505600
125435356 hkdass001 A Aug. 10, 2021, 3 a.m. OK GNU C++14 TESTS 11 77 4505600
125427611 DPair A Aug. 10, 2021, 12:19 a.m. OK GNU C++17 TESTS 11 46 4710400
125443887 rendy_ad89 A Aug. 10, 2021, 5:18 a.m. OK GNU C++17 TESTS 11 62 3686400
125435507 xu...hao A Aug. 10, 2021, 3:02 a.m. OK GNU C++17 TESTS 11 62 3788800
125417919 DeuteriumHydrogen A Aug. 9, 2021, 7:42 p.m. OK GNU C++17 TESTS 11 62 4096000
125408431 Forkan A Aug. 9, 2021, 5:48 p.m. OK GNU C++17 TESTS 11 77 3686400
125414794 lefela A Aug. 9, 2021, 6:56 p.m. OK GNU C++17 TESTS 11 77 3788800
125446899 aolian A Aug. 10, 2021, 6:01 a.m. OK GNU C++17 TESTS 11 77 4096000
125446186 akash0711 A Aug. 10, 2021, 5:51 a.m. OK GNU C++17 TESTS 11 77 4096000
125444245 dchhaparia A Aug. 10, 2021, 5:23 a.m. OK GNU C++17 TESTS 11 77 4096000
125427725 Stars_df A Aug. 10, 2021, 12:23 a.m. OK GNU C++17 TESTS 11 77 4096000
125426284 Tony102 A Aug. 9, 2021, 11:32 p.m. OK GNU C++17 (64) TESTS 11 15 6758400
125410977 mohammad_reza A Aug. 9, 2021, 6:11 p.m. OK GNU C++17 (64) TESTS 11 46 4300800
125412587 rayated A Aug. 9, 2021, 6:28 p.m. OK GNU C++17 (64) TESTS 11 46 4300800
125438635 shekabhi1208 A Aug. 10, 2021, 3:54 a.m. OK GNU C++17 (64) TESTS 11 46 4300800
125444899 PaliLo A Aug. 10, 2021, 5:33 a.m. OK GNU C++17 (64) TESTS 11 46 4710400
125411289 ShadowLight A Aug. 9, 2021, 6:14 p.m. OK GNU C++17 (64) TESTS 11 46 4710400
125433282 medicdht A Aug. 10, 2021, 2:27 a.m. OK GNU C++17 (64) TESTS 11 46 4710400
125439445 TAoz1 A Aug. 10, 2021, 4:07 a.m. OK GNU C++17 (64) TESTS 11 46 4710400
125408248 rishisgsits_22 A Aug. 9, 2021, 5:47 p.m. OK GNU C++17 (64) TESTS 11 46 5120000
125409793 rawknit A Aug. 9, 2021, 6 p.m. OK GNU C++17 (64) TESTS 11 46 5939200
125413515 lolopat2 A Aug. 9, 2021, 6:39 p.m. OK Go TESTS 11 62 16179200
125427764 Ikkkkkkms A Aug. 10, 2021, 12:24 a.m. OK Go TESTS 11 234 16486400
125437191 Anuj_Panchal A Aug. 10, 2021, 3:30 a.m. OK Java 11 TESTS 11 202 23961600
125434912 Sanju_250406 A Aug. 10, 2021, 2:53 a.m. OK Java 11 TESTS 11 217 24371200
125445948 Pro_iq A Aug. 10, 2021, 5:47 a.m. OK Java 11 TESTS 11 218 24064000
125414011 kartikey99 A Aug. 9, 2021, 6:46 p.m. OK Java 11 TESTS 11 233 25190400
125419558 18ucc061 A Aug. 9, 2021, 8:13 p.m. OK Java 11 TESTS 11 249 24268800
125420913 asamanta A Aug. 9, 2021, 8:42 p.m. OK Java 11 TESTS 11 249 24371200
125431254 mitulgarg A Aug. 10, 2021, 1:49 a.m. OK Java 11 TESTS 11 249 24678400
125406493 abhay_081060 A Aug. 9, 2021, 5:34 p.m. OK Java 11 TESTS 11 249 24883200
125445887 umanggupta1975 A Aug. 10, 2021, 5:46 a.m. OK Java 11 TESTS 11 264 28262400
125434374 Andwerp A Aug. 10, 2021, 2:44 a.m. OK Java 11 TESTS 11 265 25292800
125406292 slow.coder A Aug. 9, 2021, 5:33 p.m. OK Java 8 TESTS 11 124 20889600
125414314 RonWonWon A Aug. 9, 2021, 6:50 p.m. OK Java 8 TESTS 11 140 21504000
125413831 sg55 A Aug. 9, 2021, 6:44 p.m. OK Java 8 TESTS 11 155 21094400
125423448 AFF A Aug. 9, 2021, 9:51 p.m. OK Java 8 TESTS 11 155 21299200
125433424 SubhaniSk7 A Aug. 10, 2021, 2:29 a.m. OK Java 8 TESTS 11 171 21401600
125435669 freezingheven A Aug. 10, 2021, 3:04 a.m. OK Java 8 TESTS 11 171 21811200
125422079 Billert A Aug. 9, 2021, 9:12 p.m. OK Java 8 TESTS 11 171 21913600
125441383 ZeuS_4 A Aug. 10, 2021, 4:39 a.m. OK Java 8 TESTS 11 171 22118400
125436643 tarun8299 A Aug. 10, 2021, 3:20 a.m. OK Java 8 TESTS 11 186 23961600
125407758 abhinavTalesra A Aug. 9, 2021, 5:43 p.m. OK Java 8 TESTS 11 187 21196800
125421739 arbuzick2007 A Aug. 9, 2021, 9:04 p.m. OK Kotlin TESTS 11 421 29081600
125416766 huy.caohuyhuy123 A Aug. 9, 2021, 7:24 p.m. OK Kotlin TESTS 11 483 30515200
125407849 canonCoder A Aug. 9, 2021, 5:44 p.m. OK Mono C# TESTS 11 218 46080000
125434375 klaus1 A Aug. 10, 2021, 2:44 a.m. OK MS C++ TESTS 11 234 4710400
125428113 xinjiurains. A Aug. 10, 2021, 12:34 a.m. OK MS C++ 2017 TESTS 11 109 4096000
125406609 Tangerine A Aug. 9, 2021, 5:35 p.m. OK MS C++ 2017 TESTS 11 264 4096000
125421915 tony.li4722 A Aug. 9, 2021, 9:08 p.m. OK MS C++ 2017 TESTS 11 295 4096000
125416944 YU_Ziyang A Aug. 9, 2021, 7:27 p.m. OK MS C++ 2017 TESTS 11 295 4710400
125411115 KaffuChinoZzz A Aug. 9, 2021, 6:12 p.m. OK MS C++ 2017 TESTS 11 295 5324800
125444149 kobedavis A Aug. 10, 2021, 5:21 a.m. OK MS C++ 2017 TESTS 11 296 5324800
125407784 jaxongir0914 A Aug. 9, 2021, 5:43 p.m. OK MS C++ 2017 TESTS 11 342 6144000
125435922 zhgzhg_ A Aug. 10, 2021, 3:08 a.m. OK MS C++ 2017 TESTS 11 452 8806400
125406998 Loremon A Aug. 9, 2021, 5:38 p.m. OK Node.js TESTS 11 686 47206400
125441491 akanodia11 A Aug. 10, 2021, 4:41 a.m. OK PyPy 3 TESTS 11 155 31948800
125421778 armsusman A Aug. 9, 2021, 9:05 p.m. OK PyPy 3 TESTS 11 233 39014400
125405806 1_2_3_4_5_9 A Aug. 9, 2021, 5:30 p.m. OK PyPy 3 TESTS 11 249 37990400
125418109 Aestroix A Aug. 9, 2021, 7:45 p.m. OK PyPy 3 TESTS 11 249 42086400
125446801 harshiit133 A Aug. 10, 2021, 6 a.m. OK PyPy 3 TESTS 11 280 37785600
125409844 arpan_goswami A Aug. 9, 2021, 6:01 p.m. OK PyPy 3 TESTS 11 342 32460800
125436204 archit0326 A Aug. 10, 2021, 3:14 a.m. OK PyPy 3 TESTS 11 342 33792000
125417882 Harazdii A Aug. 9, 2021, 7:41 p.m. OK PyPy 3 TESTS 11 358 33894400
125441178 DK46 A Aug. 10, 2021, 4:36 a.m. OK PyPy 3 TESTS 11 358 33894400
125422781 namans777 A Aug. 9, 2021, 9:31 p.m. OK PyPy 3 TESTS 11 358 33894400
125415225 gg7916 A Aug. 9, 2021, 7:01 p.m. OK Python 3 TESTS 11 139 17100800
125446531 rondou A Aug. 10, 2021, 5:56 a.m. OK Python 3 TESTS 11 140 17510400
125430642 bernard5 A Aug. 10, 2021, 1:36 a.m. OK Python 3 TESTS 11 155 17100800
125429952 arthiccc A Aug. 10, 2021, 1:20 a.m. OK Python 3 TESTS 11 155 17100800
125412131 dhruval1234 A Aug. 9, 2021, 6:23 p.m. OK Python 3 TESTS 11 155 17100800
125411296 nikuradze2006 A Aug. 9, 2021, 6:14 p.m. OK Python 3 TESTS 11 155 17100800
125443716 chethan_9604 A Aug. 10, 2021, 5:15 a.m. OK Python 3 TESTS 11 156 17100800
125437745 jacksparrow_9604 A Aug. 10, 2021, 3:39 a.m. OK Python 3 TESTS 11 156 17100800
125434324 aman2000jaiswal14 A Aug. 10, 2021, 2:43 a.m. OK Python 3 TESTS 11 170 17817600
125440188 Suborno_Deb_Bappon A Aug. 10, 2021, 4:19 a.m. OK Python 3 TESTS 11 171 16998400
125446037 black_rise A Aug. 10, 2021, 5:49 a.m. OK Scala TESTS 11 654 46387200

remove filters

Back to search problems