Codeforces Round 867 (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
1822 Codeforces Round 867 (Div. 3) FINISHED False 8100 54919463 April 24, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 25309 ) B Karina and Array PROGRAMMING greedy math

B"Karina has an array of n integers a_1, a_2, a_3, ... , a_n . She loves multiplying numbers, so she decided that the beauty of a pair of numbers is their product. And the beauty of an array is the maximum beauty of a pair of adjacent elements in the array. For example, for n = 4 , a=[3, 5, 7, 4] , the beauty of the array is max ( 3 cdot 5 , 5 cdot 7 , 7 cdot 4 ) = max ( 15 , 35 , 28 ) = 35 . Karina wants her array to be as beautiful as possible. In order to achieve her goal, she can remove some elements (possibly zero) from the array. After Karina removes all elements she wants to, the array must contain at least two elements. Unfortunately, Karina doesn't have enough time to do all her tasks, so she asks you to calculate the maximum beauty of the array that she can get by removing any number of elements (possibly zero). The first line of the input contains an integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The description of the test cases follows. The first line of a test case contains an integer n ( 2 <= n <= 2 cdot 10^5 ) -- the length of the array a . The second line of a test case contains n integers a_1, a_2, a_3, ... , a_n ( -10^9 <= a_i <= 10^9 ) -- the elements of the array a . The sum of all values of n across all test cases does not exceed 2 cdot 10^5 . Output t integers, each of which is the answer to the corresponding test case -- the maximum beauty of the array that Karina can get. In the first test case of the example, to get the maximum beauty, you need to remove the 2 -nd element. In the second and third test cases of the example, there is no need to remove any elements to achieve maximum beauty. In the fourth test case of the example, you need to leave only the first and last elements. "...

Tutorials

Codeforces Round #867 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
203382000 bluemegane B April 25, 2023, 12:56 a.m. OK C# 8 TESTS 8 155 22323200
203392291 sound-medium521 B April 25, 2023, 4:01 a.m. OK Clang++20 Diagnostics TESTS 8 1138 3788800
203380276 RidWain101 B April 25, 2023, 12:17 a.m. OK Clang++20 Diagnostics TESTS 8 1185 11571200
203348296 MinhPython B April 24, 2023, 5:07 p.m. OK FPC TESTS 5 92 40038400
203372687 warks B April 24, 2023, 9:27 p.m. OK GNU C11 TESTS 8 93 1024000
203396288 brutal_coder45 B April 25, 2023, 5:03 a.m. OK GNU C11 TESTS 8 93 7987200
203387441 Sadman_Ishtiak B April 25, 2023, 2:46 a.m. OK GNU C11 TESTS 8 109 2355200
203352871 tonightfive B April 24, 2023, 5:37 p.m. OK GNU C++14 TESTS 5 61 0
203352956 TonightV B April 24, 2023, 5:38 p.m. OK GNU C++14 TESTS 5 61 0
203389452 PlayGlassBall B April 25, 2023, 3:19 a.m. OK GNU C++14 TESTS 8 62 0
203393347 henryleecode23 B April 25, 2023, 4:17 a.m. OK GNU C++14 TESTS 8 62 0
203382181 FedLx B April 25, 2023, 1 a.m. OK GNU C++14 TESTS 8 62 819200
203390062 KhaledFarhat B April 25, 2023, 3:28 a.m. OK GNU C++14 TESTS 8 62 2150400
203345417 truong852002 B April 24, 2023, 4:54 p.m. OK GNU C++14 TESTS 5 77 1638400
203391534 sonugupta07 B April 25, 2023, 3:49 a.m. OK GNU C++14 TESTS 8 77 1638400
203388880 sarahpanwar992 B April 25, 2023, 3:10 a.m. OK GNU C++14 TESTS 8 77 1638400
203393447 Royo B April 25, 2023, 4:19 a.m. OK GNU C++14 TESTS 8 77 1638400
203371184 Black_Ant B April 24, 2023, 9:02 p.m. OK GNU C++17 TESTS 5 46 1536000
203373103 ahmadsayed102 B April 24, 2023, 9:34 p.m. OK GNU C++17 TESTS 8 46 1843200
203382511 osamaBelal B April 25, 2023, 1:07 a.m. OK GNU C++17 TESTS 8 61 102400
203350941 KumarPrashant B April 24, 2023, 5:23 p.m. OK GNU C++17 TESTS 5 61 2969600
203389391 zafucowhorse B April 25, 2023, 3:18 a.m. OK GNU C++17 TESTS 8 62 0
203347076 jie17. B April 24, 2023, 5:01 p.m. OK GNU C++17 TESTS 5 62 0
203360159 Rubenillo04 B April 24, 2023, 6:43 p.m. OK GNU C++17 TESTS 5 62 819200
203388993 ZXG_DZXX B April 25, 2023, 3:11 a.m. OK GNU C++17 TESTS 8 62 819200
203375605 Redo_R B April 24, 2023, 10:27 p.m. OK GNU C++17 TESTS 8 62 819200
203397275 Codiyapa_ B April 25, 2023, 5:17 a.m. OK GNU C++17 TESTS 8 62 819200
203351763 naman-0316 B April 24, 2023, 5:29 p.m. OK GNU C++17 (64) TESTS 5 30 1638400
203359507 you_knowme B April 24, 2023, 6:38 p.m. OK GNU C++17 (64) TESTS 5 31 1638400
203377356 Mahmoud_Alaaraj B April 24, 2023, 11:07 p.m. OK GNU C++17 (64) TESTS 8 46 0
203350912 notCF_c0der B April 24, 2023, 5:22 p.m. OK GNU C++17 (64) TESTS 5 46 819200
203359344 Reema_hmad B April 24, 2023, 6:36 p.m. OK GNU C++17 (64) TESTS 5 46 819200
203366780 MarcosK B April 24, 2023, 7:57 p.m. OK GNU C++17 (64) TESTS 5 46 1638400
203361822 Shyam_Dhamecha B April 24, 2023, 7 p.m. OK GNU C++17 (64) TESTS 5 46 1638400
203374001 HelmOptimum B April 24, 2023, 9:51 p.m. OK GNU C++17 (64) TESTS 8 46 1638400
203377207 omar_mahmoud1 B April 24, 2023, 11:04 p.m. OK GNU C++17 (64) TESTS 8 46 1638400
203399004 surajmisal18 B April 25, 2023, 5:41 a.m. OK GNU C++17 (64) TESTS 8 46 1638400
203352297 max_ph B April 24, 2023, 5:32 p.m. OK GNU C++20 (64) TESTS 5 30 1638400
203398223 Wulz B April 25, 2023, 5:30 a.m. OK GNU C++20 (64) TESTS 8 30 1638400
203364183 ishaan B April 24, 2023, 7:25 p.m. OK GNU C++20 (64) TESTS 5 31 0
203349623 kerolos.raouf5600 B April 24, 2023, 5:14 p.m. OK GNU C++20 (64) TESTS 5 31 0
203377808 Essa2006 B April 24, 2023, 11:17 p.m. OK GNU C++20 (64) TESTS 8 31 0
203393408 Sazzad2026 B April 25, 2023, 4:18 a.m. OK GNU C++20 (64) TESTS 8 31 1638400
203393207 __XuSihan B April 25, 2023, 4:15 a.m. OK GNU C++20 (64) TESTS 8 31 1638400
203400073 Pangbai B April 25, 2023, 5:55 a.m. OK GNU C++20 (64) TESTS 8 31 1638400
203400208 ethicalADI B April 25, 2023, 5:58 a.m. OK GNU C++20 (64) TESTS 8 31 1638400
203398695 tanvir03 B April 25, 2023, 5:37 a.m. OK GNU C++20 (64) TESTS 8 31 1638400
203399127 WSZY B April 25, 2023, 5:43 a.m. OK Java 11 TESTS 8 217 0
203391472 optimus1369 B April 25, 2023, 3:48 a.m. OK Java 11 TESTS 8 233 0
203359967 ch2001 B April 24, 2023, 6:42 p.m. OK Java 11 TESTS 5 249 0
203357777 elf B April 24, 2023, 6:20 p.m. OK Java 11 TESTS 5 249 0
203362724 vijender_8601 B April 24, 2023, 7:10 p.m. OK Java 11 TESTS 5 296 2764800
203399148 q2045891621. B April 25, 2023, 5:43 a.m. OK Java 11 TESTS 8 296 4403200
203357429 g_square B April 24, 2023, 6:17 p.m. OK Java 11 TESTS 5 312 0
203395527 Bheem_1 B April 25, 2023, 4:52 a.m. OK Java 11 TESTS 8 561 3686400
203356183 biu_biu_biu B April 24, 2023, 6:05 p.m. OK Java 11 TESTS 5 748 0
203360154 Ad1l3t B April 24, 2023, 6:43 p.m. OK Java 11 TESTS 5 857 0
203358896 elf B April 24, 2023, 6:31 p.m. OK Java 17 TESTS 5 171 102400
203354931 michaelc592 B April 24, 2023, 5:54 p.m. OK Java 17 TESTS 5 233 409600
203350352 maurya.rahul682 B April 24, 2023, 5:19 p.m. OK Java 17 TESTS 5 249 0
203377492 IceWolf898 B April 24, 2023, 11:10 p.m. OK Java 17 TESTS 8 249 921600
203396812 aishwarykesarwani B April 25, 2023, 5:11 a.m. OK Java 17 TESTS 8 264 1126400
203394794 yogesg_25 B April 25, 2023, 4:40 a.m. OK Java 17 TESTS 8 265 307200
203391257 Doni04 B April 25, 2023, 3:44 a.m. OK Java 17 TESTS 8 265 614400
203378621 Abdelrahman.M.3 B April 24, 2023, 11:37 p.m. OK Java 17 TESTS 8 280 7065600
203363293 r3hab.rs B April 24, 2023, 7:16 p.m. OK Java 17 TESTS 5 295 614400
203394432 TJ_Codes B April 25, 2023, 4:34 a.m. OK Java 17 TESTS 8 326 102400
203371136 banurr B April 24, 2023, 9:01 p.m. OK Java 8 TESTS 5 155 2252800
203363575 Saurabh-Sharma B April 24, 2023, 7:19 p.m. OK Java 8 TESTS 5 155 2969600
203356087 banurr B April 24, 2023, 6:04 p.m. OK Java 8 TESTS 5 171 0
203399413 nikhil97agra B April 25, 2023, 5:47 a.m. OK Java 8 TESTS 8 202 2969600
203359935 vaibhavgawad B April 24, 2023, 6:41 p.m. OK Java 8 TESTS 5 202 2969600
203360959 googlepaiintern B April 24, 2023, 6:52 p.m. OK Java 8 TESTS 5 202 3072000
203357730 Daly105 B April 24, 2023, 6:20 p.m. OK Java 8 TESTS 5 202 3072000
203377555 Rafael.sam B April 24, 2023, 11:11 p.m. OK Java 8 TESTS 8 202 4096000
203345993 Koka B April 24, 2023, 4:56 p.m. OK Java 8 TESTS 5 202 5017600
203363490 Saurabh-Sharma B April 24, 2023, 7:18 p.m. OK Java 8 TESTS 5 217 2867200
203354913 illusion_ B April 24, 2023, 5:54 p.m. OK Kotlin 1.7 TESTS 5 670 89395200
203346181 eneskayiklik B April 24, 2023, 4:56 p.m. OK Kotlin 1.7 TESTS 5 685 52633600
203355104 illusion_ B April 24, 2023, 5:55 p.m. OK Kotlin 1.7 TESTS 5 748 104448000
203382006 DeadlyMello B April 25, 2023, 12:56 a.m. OK Kotlin 1.7 TESTS 8 811 109465600
203400286 00013841876268 B April 25, 2023, 5:59 a.m. OK MS C++ 2017 TESTS 8 233 0
203354509 valavshonok B April 24, 2023, 5:50 p.m. OK MS C++ 2017 TESTS 5 233 0
203388250 fengxin11 B April 25, 2023, 3 a.m. OK MS C++ 2017 TESTS 8 249 1638400
203363074 mochristo B April 24, 2023, 7:13 p.m. OK MS C++ 2017 TESTS 5 249 1843200
203389933 fengxin11 B April 25, 2023, 3:26 a.m. OK MS C++ 2017 TESTS 8 280 819200
203364462 shorya1835 B April 24, 2023, 7:29 p.m. OK MS C++ 2017 TESTS 5 358 1638400
203395751 maihu02 B April 25, 2023, 4:55 a.m. OK PyPy 3 TESTS 8 546 19251200
203381582 xin2002 B April 25, 2023, 12:47 a.m. OK PyPy 3 TESTS 8 560 17510400
203352766 flownn B April 24, 2023, 5:36 p.m. OK PyPy 3 TESTS 5 608 19046400
203355489 pennywise_ B April 24, 2023, 5:59 p.m. OK PyPy 3 TESTS 5 654 20889600
203357367 oneku16 B April 24, 2023, 6:16 p.m. OK PyPy 3-64 TESTS 5 124 23961600
203354487 rmr B April 24, 2023, 5:50 p.m. OK PyPy 3-64 TESTS 5 140 20787200
203361113 AyuAnchor B April 24, 2023, 6:53 p.m. OK PyPy 3-64 TESTS 5 140 26828800
203381992 nealzane B April 25, 2023, 12:56 a.m. OK PyPy 3-64 TESTS 8 155 31436800
203387776 little_bai B April 25, 2023, 2:52 a.m. OK PyPy 3-64 TESTS 8 170 21196800
203357281 oneku16 B April 24, 2023, 6:15 p.m. OK PyPy 3-64 TESTS 5 170 23961600
203357438 oneku16 B April 24, 2023, 6:17 p.m. OK PyPy 3-64 TESTS 5 171 23961600
203386473 Marquis03 B April 25, 2023, 2:29 a.m. OK PyPy 3-64 TESTS 8 186 27033600
203351880 Kladrr B April 24, 2023, 5:29 p.m. OK PyPy 3-64 TESTS 5 202 23961600
203390495 adithya1207 B April 25, 2023, 3:34 a.m. OK PyPy 3-64 TESTS 8 202 28364800
203382733 biltharesatyendra B April 25, 2023, 1:12 a.m. OK Python 2 TESTS 8 217 11059200
203392106 gebeng B April 25, 2023, 3:58 a.m. OK Python 3 TESTS 8 187 15872000
203371642 dannn15 B April 24, 2023, 9:10 p.m. OK Python 3 TESTS 5 202 15872000
203397221 vnraid2021 B April 25, 2023, 5:16 a.m. OK Python 3 TESTS 8 202 16179200
203392775 Mohamed_Nasr24 B April 25, 2023, 4:08 a.m. OK Python 3 TESTS 8 202 16179200
203355139 self_learner B April 24, 2023, 5:56 p.m. OK Python 3 TESTS 5 202 16179200
203350081 Learner_vp1729 B April 24, 2023, 5:17 p.m. OK Python 3 TESTS 5 202 16179200
203349200 wwwbomba0401 B April 24, 2023, 5:12 p.m. OK Python 3 TESTS 5 202 16179200
203345235 asan_aLi B April 24, 2023, 4:53 p.m. OK Python 3 TESTS 5 202 16179200
203374626 Paden B April 24, 2023, 10:06 p.m. OK Python 3 TESTS 8 202 16281600
203347618 SARKAR2213 B April 24, 2023, 5:03 p.m. OK Python 3 TESTS 5 202 16281600
203396152 cpchenpi B April 25, 2023, 5:01 a.m. OK Rust 2021 TESTS 8 31 5836800
203366399 wbars B April 24, 2023, 7:52 p.m. OK Rust 2021 TESTS 5 108 11059200
203368867 yllo B April 24, 2023, 8:26 p.m. OK Rust 2021 TESTS 5 140 9011200

remove filters

Back to search problems