Codeforces Round 670 (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
1406 Codeforces Round 670 (Div. 2) FINISHED False 7200 131904899 Sept. 12, 2020, 1:45 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 22767 ) B Maximum Product PROGRAMMING brute force dp greedy implementation sortings

B"You are given an array of integers a_1,a_2, ldots,a_n . Find the maximum possible value of a_ia_ja_ka_la_t among all five indices (i, j, k, l, t) ( i<j<k<l<t ). The input consists of multiple test cases. The first line contains an integer t ( 1 <= t <= 2 cdot 10^4 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains a single integer n ( 5 <= n <= 10^5 ) -- the size of the array. The second line of each test case contains n integers a_1,a_2, ldots,a_n ( -3 x 10^3 <= a_i <= 3 x 10^3 ) -- given array. It's guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, print one integer -- the answer to the problem. In the first test case, choosing a_1,a_2,a_3,a_4,a_5 is a best choice: (-1) cdot (-2) cdot (-3) cdot (-4) cdot (-5)=-120 . In the second test case, choosing a_1,a_2,a_3,a_5,a_6 is a best choice: (-1) cdot (-2) cdot (-3) cdot 2 cdot (-1)=12 . In the third test case, choosing a_1,a_2,a_3,a_4,a_5 is a best choice: (-1) cdot 0 cdot 0 cdot 0 cdot (-1)=0 . In the fourth test case, choosing a_1,a_2,a_3,a_4,a_6 is a best choice: (-9) cdot (-7) cdot (-5) cdot (-3) cdot 1=945 . "...

Tutorials

Codeforces Round #670 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
92644167 kakayoshi B Sept. 12, 2020, 4:15 p.m. OK FPC TESTS 11 78 819200
92643037 Neos B Sept. 12, 2020, 4:10 p.m. OK FPC TESTS 11 92 819200
92652808 babaiserror B Sept. 12, 2020, 5:24 p.m. OK GNU C11 TESTS 11 62 409600
92643517 babaiserror B Sept. 12, 2020, 4:12 p.m. OK GNU C11 TESTS 11 93 409600
92668892 siumai B Sept. 12, 2020, 10:17 p.m. OK GNU C11 TESTS 11 93 7782400
92674423 EricQian B Sept. 13, 2020, 2:07 a.m. OK GNU C++11 TESTS 11 31 409600
92671357 Caplan_thruster B Sept. 13, 2020, 12:15 a.m. OK GNU C++11 TESTS 11 31 819200
92671606 luogu_bot1 B Sept. 13, 2020, 12:26 a.m. OK GNU C++11 TESTS 11 31 819200
92671896 wxwoo B Sept. 13, 2020, 12:37 a.m. OK GNU C++11 TESTS 11 31 819200
92684110 shengzihang B Sept. 13, 2020, 5:43 a.m. OK GNU C++11 TESTS 11 31 819200
92677043 gyh20 B Sept. 13, 2020, 3:16 a.m. OK GNU C++11 TESTS 11 31 1638400
92672741 LOVE_YJZ B Sept. 13, 2020, 1:11 a.m. OK GNU C++11 TESTS 11 31 3686400
92684275 luogu_bot1 B Sept. 13, 2020, 5:46 a.m. OK GNU C++11 TESTS 11 31 3686400
92679501 zknpy B Sept. 13, 2020, 4:19 a.m. OK GNU C++11 TESTS 11 31 3993600
92675851 WaluntOvO B Sept. 13, 2020, 2:45 a.m. OK GNU C++11 TESTS 11 31 7987200
92684739 clarkent B Sept. 13, 2020, 5:53 a.m. OK GNU C++14 TESTS 11 46 1433600
92678181 reddy_123 B Sept. 13, 2020, 3:45 a.m. OK GNU C++14 TESTS 11 61 2355200
92655148 riddle279 B Sept. 12, 2020, 5:52 p.m. OK GNU C++14 TESTS 11 62 409600
92639428 fanqeixi B Sept. 12, 2020, 3:41 p.m. OK GNU C++14 TESTS 11 62 409600
92683531 tushar284 B Sept. 13, 2020, 5:34 a.m. OK GNU C++14 TESTS 11 62 409600
92672475 972297886 B Sept. 13, 2020, 1:01 a.m. OK GNU C++14 TESTS 11 62 409600
92669352 MrDracuLa B Sept. 12, 2020, 10:34 p.m. OK GNU C++14 TESTS 11 62 409600
92679650 Mr_Bin B Sept. 13, 2020, 4:22 a.m. OK GNU C++14 TESTS 11 62 819200
92677285 compilationerror_ B Sept. 13, 2020, 3:23 a.m. OK GNU C++14 TESTS 11 62 819200
92678118 kiliet B Sept. 13, 2020, 3:43 a.m. OK GNU C++14 TESTS 11 62 819200
92668854 hck_in_crs_hrt B Sept. 12, 2020, 10:16 p.m. OK GNU C++17 TESTS 11 46 409600
92651165 aditya7777gupta B Sept. 12, 2020, 5:07 p.m. OK GNU C++17 TESTS 11 46 1228800
92653536 bsbs B Sept. 12, 2020, 5:33 p.m. OK GNU C++17 TESTS 11 46 2150400
92670051 platinumtea7 B Sept. 12, 2020, 11:05 p.m. OK GNU C++17 TESTS 11 61 512000
92655072 AMADEUS.exe B Sept. 12, 2020, 5:51 p.m. OK GNU C++17 TESTS 11 61 1126400
92671077 Bedoazim B Sept. 12, 2020, 11:58 p.m. OK GNU C++17 TESTS 11 61 1126400
92657608 popovicirobert B Sept. 12, 2020, 6:22 p.m. OK GNU C++17 TESTS 11 61 1126400
92661205 Ri_Ni B Sept. 12, 2020, 7:15 p.m. OK GNU C++17 TESTS 11 62 409600
92676360 tzy666 B Sept. 13, 2020, 2:58 a.m. OK GNU C++17 TESTS 11 62 409600
92671333 platinumtea7 B Sept. 13, 2020, 12:13 a.m. OK GNU C++17 TESTS 11 62 409600
92648840 axat0081 B Sept. 12, 2020, 4:44 p.m. OK GNU C++17 (64) TESTS 11 31 4198400
92653688 axat0081 B Sept. 12, 2020, 5:35 p.m. OK GNU C++17 (64) TESTS 11 31 4608000
92681294 LayCurse B Sept. 13, 2020, 4:57 a.m. OK GNU C++17 (64) TESTS 11 31 99942400
92651851 nile_101 B Sept. 12, 2020, 5:14 p.m. OK GNU C++17 (64) TESTS 11 46 409600
92671618 keepers B Sept. 13, 2020, 12:26 a.m. OK GNU C++17 (64) TESTS 11 46 819200
92670425 pseuda B Sept. 12, 2020, 11:22 p.m. OK GNU C++17 (64) TESTS 11 46 819200
92663230 Vuset_Orucov B Sept. 12, 2020, 7:50 p.m. OK GNU C++17 (64) TESTS 11 46 819200
92677099 diyora13 B Sept. 13, 2020, 3:18 a.m. OK GNU C++17 (64) TESTS 11 46 819200
92676346 Ananddubey01 B Sept. 13, 2020, 2:58 a.m. OK GNU C++17 (64) TESTS 11 46 819200
92673403 henrytsui B Sept. 13, 2020, 1:33 a.m. OK GNU C++17 (64) TESTS 11 46 819200
92663004 Awa149 B Sept. 12, 2020, 7:46 p.m. OK Go TESTS 11 109 5529600
92647891 HastaLaVistaLa B Sept. 12, 2020, 4:36 p.m. OK Java 11 TESTS 11 187 0
92666402 bluesky111 B Sept. 12, 2020, 8:58 p.m. OK Java 11 TESTS 11 218 0
92685359 harshvijayvargiya8 B Sept. 13, 2020, 6:02 a.m. OK Java 11 TESTS 11 233 0
92660301 qlf9 B Sept. 12, 2020, 7:01 p.m. OK Java 11 TESTS 11 233 0
92653171 b0bl0blaw B Sept. 12, 2020, 5:28 p.m. OK Java 11 TESTS 11 233 0
92645494 KUNALJHAMB B Sept. 12, 2020, 4:21 p.m. OK Java 11 TESTS 11 233 1945600
92654967 chris_11 B Sept. 12, 2020, 5:50 p.m. OK Java 11 TESTS 11 234 3584000
92679941 dmw B Sept. 13, 2020, 4:29 a.m. OK Java 11 TESTS 11 249 0
92670578 jaynils B Sept. 12, 2020, 11:31 p.m. OK Java 11 TESTS 11 264 0
92643428 vaishnav_firebolt B Sept. 12, 2020, 4:11 p.m. OK Java 11 TESTS 11 265 0
92666684 gawsfbet B Sept. 12, 2020, 9:06 p.m. OK Java 8 TESTS 11 124 0
92655288 Pranay2516 B Sept. 12, 2020, 5:53 p.m. OK Java 8 TESTS 11 124 0
92652162 niteshnanda B Sept. 12, 2020, 5:18 p.m. OK Java 8 TESTS 11 124 0
92644577 RockStar_14 B Sept. 12, 2020, 4:17 p.m. OK Java 8 TESTS 11 124 0
92666241 gawsfbet B Sept. 12, 2020, 8:54 p.m. OK Java 8 TESTS 11 140 0
92658883 GortenMorsa B Sept. 12, 2020, 6:39 p.m. OK Java 8 TESTS 11 140 0
92654765 nietzschewalrus779 B Sept. 12, 2020, 5:48 p.m. OK Java 8 TESTS 11 140 0
92653007 GortenMorsa B Sept. 12, 2020, 5:26 p.m. OK Java 8 TESTS 11 140 0
92678155 sumedh.shenoy B Sept. 13, 2020, 3:44 a.m. OK Java 8 TESTS 11 155 0
92674522 sumitnitesh123 B Sept. 13, 2020, 2:10 a.m. OK Java 8 TESTS 11 170 0
92651792 koboshi B Sept. 12, 2020, 5:14 p.m. OK Kotlin TESTS 11 186 1024000
92673146 Spheniscine B Sept. 13, 2020, 1:25 a.m. OK Kotlin TESTS 11 187 2150400
92661062 v4_adi B Sept. 12, 2020, 7:13 p.m. OK Kotlin TESTS 11 327 3788800
92644690 seirion B Sept. 12, 2020, 4:17 p.m. OK Kotlin TESTS 11 343 3481600
92680955 azukun B Sept. 13, 2020, 4:50 a.m. OK Mono C# TESTS 11 155 11571200
92678590 fgwiebfaoish B Sept. 13, 2020, 3:56 a.m. OK Mono C# TESTS 11 170 7168000
92642900 Yupiteru B Sept. 12, 2020, 4:10 p.m. OK Mono C# TESTS 11 202 13824000
92672130 CFWudanna B Sept. 13, 2020, 12:49 a.m. OK MS C++ TESTS 11 140 1638400
92672279 CFWudanna B Sept. 13, 2020, 12:54 a.m. OK MS C++ TESTS 11 156 1638400
92656973 exode4 B Sept. 12, 2020, 6:14 p.m. OK MS C++ 2017 TESTS 11 77 819200
92644520 define_chan B Sept. 12, 2020, 4:16 p.m. OK MS C++ 2017 TESTS 11 93 3788800
92679733 AlwaysSmile998 B Sept. 13, 2020, 4:24 a.m. OK MS C++ 2017 TESTS 11 108 409600
92644674 megatortik B Sept. 12, 2020, 4:17 p.m. OK MS C++ 2017 TESTS 11 156 819200
92677458 AlwaysSmile998 B Sept. 13, 2020, 3:27 a.m. OK MS C++ 2017 TESTS 11 186 409600
92649255 Vetriti B Sept. 12, 2020, 4:48 p.m. OK MS C++ 2017 TESTS 11 186 819200
92679177 Mathematical_Olympiad B Sept. 13, 2020, 4:11 a.m. OK MS C++ 2017 TESTS 11 186 819200
92657854 Gravekper B Sept. 12, 2020, 6:26 p.m. OK MS C++ 2017 TESTS 11 186 1740800
92675301 JeriLee B Sept. 13, 2020, 2:31 a.m. OK MS C++ 2017 TESTS 11 186 1740800
92683370 songjunwei B Sept. 13, 2020, 5:31 a.m. OK MS C++ 2017 TESTS 11 186 2457600
92650462 OmniSliver B Sept. 12, 2020, 5 p.m. OK Node.js TESTS 11 218 13516800
92647012 hajab B Sept. 12, 2020, 4:30 p.m. OK PyPy 2 TESTS 11 858 10649600
92660427 EpicChadGamer B Sept. 12, 2020, 7:03 p.m. OK PyPy 3 TESTS 11 264 11673600
92680822 brthyyjp B Sept. 13, 2020, 4:48 a.m. OK PyPy 3 TESTS 11 280 12185600
92646787 neweekoff B Sept. 12, 2020, 4:29 p.m. OK PyPy 3 TESTS 11 280 12288000
92645761 moriarty1992 B Sept. 12, 2020, 4:22 p.m. OK PyPy 3 TESTS 11 295 11878400
92679424 codershuvo B Sept. 13, 2020, 4:17 a.m. OK PyPy 3 TESTS 11 326 12390400
92643796 shubh1815 B Sept. 12, 2020, 4:13 p.m. OK PyPy 3 TESTS 11 326 12492800
92678991 programmer_neo B Sept. 13, 2020, 4:06 a.m. OK PyPy 3 TESTS 11 326 77926400
92643275 DebRC B Sept. 12, 2020, 4:11 p.m. OK PyPy 3 TESTS 11 327 11673600
92679981 SpicyKong B Sept. 13, 2020, 4:30 a.m. OK PyPy 3 TESTS 11 342 11366400
92664813 sumitthakur B Sept. 12, 2020, 8:21 p.m. OK PyPy 3 TESTS 11 342 11673600
92681276 eugalt B Sept. 13, 2020, 4:57 a.m. OK Python 3 TESTS 11 186 8499200
92681073 deepcoder_B B Sept. 13, 2020, 4:53 a.m. OK Python 3 TESTS 11 202 7475200
92680354 maukaHAI B Sept. 13, 2020, 4:38 a.m. OK Python 3 TESTS 11 202 7475200
92648593 eugalt B Sept. 12, 2020, 4:42 p.m. OK Python 3 TESTS 11 217 7782400
92667538 fazle_rabbi_ferdaus B Sept. 12, 2020, 9:30 p.m. OK Python 3 TESTS 11 248 6553600
92649242 printhelloworld B Sept. 12, 2020, 4:48 p.m. OK Python 3 TESTS 11 249 6553600
92648147 ranjithm2001 B Sept. 12, 2020, 4:38 p.m. OK Python 3 TESTS 11 249 6860800
92648021 eugalt B Sept. 12, 2020, 4:37 p.m. OK Python 3 TESTS 11 249 7680000
92652652 301_anky B Sept. 12, 2020, 5:23 p.m. OK Python 3 TESTS 11 264 6553600
92647112 priyatosh97 B Sept. 12, 2020, 4:31 p.m. OK Python 3 TESTS 11 264 6553600
92658396 wow_ok B Sept. 12, 2020, 6:33 p.m. OK Ruby TESTS 11 701 9523200
92658270 wow_ok B Sept. 12, 2020, 6:31 p.m. OK Ruby TESTS 11 717 11264000
92672981 sansen B Sept. 13, 2020, 1:19 a.m. OK Rust TESTS 11 62 3174400
92679828 akks800 B Sept. 13, 2020, 4:27 a.m. OK Rust TESTS 11 62 5017600
92677470 Ramadoka. B Sept. 13, 2020, 3:27 a.m. OK Rust TESTS 11 124 3891200

remove filters

Back to search problems