Codeforces Round 929 (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
1933 Codeforces Round 929 (Div. 3) FINISHED False 8100 22778699 Feb. 27, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 38321 ) A Turtle Puzzle: Rearrange and Negate PROGRAMMING greedy math sortings

B'You are given an array a of n integers. You must perform the following two operations on the array (the first, then the second): What is the maximum sum of the array elements after performing these two operations (the first, then the second)? The first line of the input contains a single integer t ( 1 <= t <= 1000 ) -- the number of test cases. The descriptions of the test cases follow. The first line of each test case contains a single integer n ( 1 <= n <= 50 ) -- the number of elements in array a . The second line of each test case contains n integers a_1, a_2, ldots, a_n ( -100 <= a_i <= 100 ) -- elements of the array. For each test case, output the maximum sum of the array elements after sequentially performing the two given operations. In the first test case, you can first rearrange the array to get [3,-2,-3] (operation 1), then choose l = 2, r = 3 and get the sum 3 + -((-2) + (-3)) = 8 (operation 2). In the second test case, you can do nothing in both operations and get the sum 0 . In the third test case, you can do nothing in both operations and get the sum 0 + 1 = 1 . In the fourth test case, you can first leave the order unchanged (operation 1), then choose l = 1, r = 1 and get the sum -(-99) = 99 (operation 2). In the fifth test case, you can first leave the order unchanged (operation 1), then choose l = 2, r = 3 and get the sum 10 + -((-2) + (-3)) + 7 = 22 (operation 2). In the sixth test case, you can first leave the order unchanged (operation 1), then choose l = 1, r = 5 and get the sum -((-1)+(-2)+(-3)+(-4)+(-5))=15 (operation 2). '...

Tutorials

Codeforces Round 929 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
248754836 justunderdog A Feb. 28, 2024, 1:27 p.m. OK C# 10 TESTS 5 46 3481600
248837865 M_Medhat A Feb. 29, 2024, 5:34 a.m. OK C# 10 TESTS 5 77 2867200
248729131 threexsix A Feb. 28, 2024, 10:46 a.m. OK C# 10 TESTS 5 77 3379200
248741033 bkifhr9 A Feb. 28, 2024, 12:03 p.m. OK Clang++17 Diagnostics TESTS 5 46 0
248790245 AbdulRahman_Salah A Feb. 28, 2024, 5:44 p.m. OK Clang++17 Diagnostics TESTS 5 139 0
248807917 rup.yes A Feb. 28, 2024, 8:30 p.m. OK Clang++17 Diagnostics TESTS 5 171 0
248762901 akku_07 A Feb. 28, 2024, 2:19 p.m. OK Clang++17 Diagnostics TESTS 5 171 0
248816990 vjudge2 A Feb. 28, 2024, 10:35 p.m. OK Clang++17 Diagnostics TESTS 5 186 0
248718395 BuriBuriZymon A Feb. 28, 2024, 9:20 a.m. OK Clang++17 Diagnostics TESTS 5 186 0
248825648 chiennguyen5981 A Feb. 29, 2024, 2:11 a.m. OK Clang++17 Diagnostics TESTS 5 187 0
248760139 bao_hu_yuan_zhang A Feb. 28, 2024, 2:01 p.m. OK Clang++17 Diagnostics TESTS 5 187 0
248743106 Tchai A Feb. 28, 2024, 12:16 p.m. OK Clang++17 Diagnostics TESTS 5 187 0
248735397 vjudge5 A Feb. 28, 2024, 11:29 a.m. OK Clang++20 Diagnostics TESTS 5 31 0
248734942 vjudge2 A Feb. 28, 2024, 11:26 a.m. OK Clang++20 Diagnostics TESTS 5 31 0
248744789 vjudge1 A Feb. 28, 2024, 12:26 p.m. OK Clang++20 Diagnostics TESTS 5 46 0
248779613 _TZYHJ_521 A Feb. 28, 2024, 4:24 p.m. OK Clang++20 Diagnostics TESTS 5 171 0
248768606 eminem18753 A Feb. 28, 2024, 3:01 p.m. OK Clang++20 Diagnostics TESTS 5 171 0
248735994 bkifhr9 A Feb. 28, 2024, 11:33 a.m. OK Clang++20 Diagnostics TESTS 5 171 0
248799213 hamzah_aj A Feb. 28, 2024, 6:58 p.m. OK Clang++20 Diagnostics TESTS 5 187 0
248752630 suranjan010101 A Feb. 28, 2024, 1:14 p.m. OK Clang++20 Diagnostics TESTS 5 187 1024000
248839666 mxn876 A Feb. 29, 2024, 5:56 a.m. OK GNU C11 TESTS 5 15 0
248749597 itsnalu A Feb. 28, 2024, 12:56 p.m. OK GNU C11 TESTS 5 15 204800
248735868 bkifhr7 A Feb. 28, 2024, 11:32 a.m. OK GNU C11 TESTS 5 15 307200
248814740 mdkhaledmhamud220 A Feb. 28, 2024, 9:54 p.m. OK GNU C11 TESTS 5 15 307200
248837843 mxn876 A Feb. 29, 2024, 5:34 a.m. OK GNU C11 TESTS 5 15 307200
248699527 SkTasnimUrRahman A Feb. 28, 2024, 6:31 a.m. OK GNU C11 TESTS 5 15 307200
248727193 pmjadhav A Feb. 28, 2024, 10:31 a.m. OK GNU C11 TESTS 5 15 307200
248722080 johnnyho1234567 A Feb. 28, 2024, 9:51 a.m. OK GNU C11 TESTS 5 15 409600
248743533 XCRcn A Feb. 28, 2024, 12:19 p.m. OK GNU C11 TESTS 5 15 8294400
248822303 Pluto_1 A Feb. 29, 2024, 12:50 a.m. OK GNU C11 TESTS 5 30 307200
248717379 Abhinav_0806 A Feb. 28, 2024, 9:12 a.m. OK GNU C++17 TESTS 5 0 0
248759327 AbdulkaderHaffar A Feb. 28, 2024, 1:56 p.m. OK GNU C++17 TESTS 5 0 0
248766079 Arsany33 A Feb. 28, 2024, 2:41 p.m. OK GNU C++17 TESTS 5 0 0
248779544 KASRA_BAHRAMI A Feb. 28, 2024, 4:24 p.m. OK GNU C++17 TESTS 5 0 0
248779928 OsmarLoeza A Feb. 28, 2024, 4:26 p.m. OK GNU C++17 TESTS 5 0 0
248714556 Sliskeyy A Feb. 28, 2024, 8:52 a.m. OK GNU C++17 TESTS 5 0 0
248766617 Aasa-chan A Feb. 28, 2024, 2:45 p.m. OK GNU C++17 TESTS 5 0 4812800
248837443 yuanzihan A Feb. 29, 2024, 5:29 a.m. OK GNU C++17 TESTS 5 15 0
248838176 theSoulExplorer A Feb. 29, 2024, 5:38 a.m. OK GNU C++17 TESTS 5 15 0
248838519 Graffolyon A Feb. 29, 2024, 5:42 a.m. OK GNU C++17 TESTS 5 15 0
248729647 July.19th A Feb. 28, 2024, 10:50 a.m. OK GNU C++17 (64) TESTS 5 0 0
248764547 Yoystc0n A Feb. 28, 2024, 2:30 p.m. OK GNU C++17 (64) TESTS 5 0 0
248736505 rishit3234 A Feb. 28, 2024, 11:36 a.m. OK GNU C++17 (64) TESTS 5 0 0
248715936 yuYgen A Feb. 28, 2024, 9:02 a.m. OK GNU C++17 (64) TESTS 5 0 0
248715424 ThisWasUnplanned A Feb. 28, 2024, 8:58 a.m. OK GNU C++17 (64) TESTS 5 0 0
248821580 SaeedSabbagh A Feb. 29, 2024, 12:31 a.m. OK GNU C++17 (64) TESTS 5 15 0
248823643 New_beginner A Feb. 29, 2024, 1:23 a.m. OK GNU C++17 (64) TESTS 5 15 0
248825285 2c2048d2 A Feb. 29, 2024, 2:04 a.m. OK GNU C++17 (64) TESTS 5 15 0
248827836 Lenvil A Feb. 29, 2024, 2:56 a.m. OK GNU C++17 (64) TESTS 5 15 0
248835580 AlanXz A Feb. 29, 2024, 5:06 a.m. OK GNU C++17 (64) TESTS 5 15 0
248785896 mikko_mikust A Feb. 28, 2024, 5:10 p.m. OK GNU C++20 (64) TESTS 5 0 0
248791066 Bido_ A Feb. 28, 2024, 5:50 p.m. OK GNU C++20 (64) TESTS 5 0 0
248800334 aerrries A Feb. 28, 2024, 7:09 p.m. OK GNU C++20 (64) TESTS 5 0 0
248818117 yousefebraheem A Feb. 28, 2024, 11 p.m. OK GNU C++20 (64) TESTS 5 0 0
248830792 Jinil_Savaj A Feb. 29, 2024, 3:55 a.m. OK GNU C++20 (64) TESTS 5 0 0
248778821 Sarvesh0955 A Feb. 28, 2024, 4:18 p.m. OK GNU C++20 (64) TESTS 5 0 0
248778434 Ninja-N01 A Feb. 28, 2024, 4:15 p.m. OK GNU C++20 (64) TESTS 5 0 0
248777985 rishabhxchoudhary A Feb. 28, 2024, 4:12 p.m. OK GNU C++20 (64) TESTS 5 0 0
248775858 adelian A Feb. 28, 2024, 3:55 p.m. OK GNU C++20 (64) TESTS 5 0 0
248773667 Umid5 A Feb. 28, 2024, 3:39 p.m. OK GNU C++20 (64) TESTS 5 0 0
248714146 jiangxiaoju A Feb. 28, 2024, 8:49 a.m. OK Go TESTS 5 15 204800
248714139 Rememorio A Feb. 28, 2024, 8:49 a.m. OK Go TESTS 5 30 614400
248685341 5h0wba11 A Feb. 28, 2024, 3:29 a.m. OK Go TESTS 5 30 819200
248756649 BishtCoder A Feb. 28, 2024, 1:38 p.m. OK Java 21 TESTS 5 202 0
248782940 Aayush_Rana_ A Feb. 28, 2024, 4:48 p.m. OK Java 21 TESTS 5 217 409600
248825001 just_a_niu_ma A Feb. 29, 2024, 1:57 a.m. OK Java 21 TESTS 5 233 0
248738477 koolkartik A Feb. 28, 2024, 11:48 a.m. OK Java 21 TESTS 5 233 0
248715201 fightingxjz A Feb. 28, 2024, 8:56 a.m. OK Java 21 TESTS 5 233 0
248743607 cpp10 A Feb. 28, 2024, 12:19 p.m. OK Java 21 TESTS 5 233 307200
248760223 Bill35 A Feb. 28, 2024, 2:02 p.m. OK Java 21 TESTS 5 249 0
248743887 cpp10 A Feb. 28, 2024, 12:21 p.m. OK Java 21 TESTS 5 249 0
248690582 Nick A Feb. 28, 2024, 4:42 a.m. OK Java 21 TESTS 5 249 0
248764471 xin2002 A Feb. 28, 2024, 2:30 p.m. OK Java 21 TESTS 5 264 0
248839029 too_depressed A Feb. 29, 2024, 5:49 a.m. OK Java 8 TESTS 5 93 0
248767571 sajibcuet09 A Feb. 28, 2024, 2:53 p.m. OK Java 8 TESTS 5 93 0
248744583 Q_R_Y A Feb. 28, 2024, 12:25 p.m. OK Java 8 TESTS 5 93 0
248686926 yashvardhan3 A Feb. 28, 2024, 3:52 a.m. OK Java 8 TESTS 5 93 0
248834144 gdax A Feb. 29, 2024, 4:46 a.m. OK Java 8 TESTS 5 108 0
248818584 mada-mada A Feb. 28, 2024, 11:11 p.m. OK Java 8 TESTS 5 108 0
248732561 ygming A Feb. 28, 2024, 11:11 a.m. OK Java 8 TESTS 5 108 0
248714516 NabidHossen A Feb. 28, 2024, 8:51 a.m. OK Java 8 TESTS 5 109 0
248764717 yellowflash A Feb. 28, 2024, 2:31 p.m. OK Java 8 TESTS 5 124 0
248724457 Sumitsingh7 A Feb. 28, 2024, 10:10 a.m. OK Java 8 TESTS 5 139 5836800
248817483 omarsaifeldeen2000 A Feb. 28, 2024, 10:44 p.m. OK JavaScript TESTS 5 31 2764800
248743540 vjudge2 A Feb. 28, 2024, 12:19 p.m. OK MS C++ 2017 TESTS 5 15 0
248815024 Piashy A Feb. 28, 2024, 9:58 p.m. OK MS C++ 2017 TESTS 5 31 0
248733371 ammar007 A Feb. 28, 2024, 11:16 a.m. OK MS C++ 2017 TESTS 5 31 0
248720400 kanuverma A Feb. 28, 2024, 9:37 a.m. OK MS C++ 2017 TESTS 5 31 0
248720136 Kanika2004 A Feb. 28, 2024, 9:35 a.m. OK MS C++ 2017 TESTS 5 31 0
248687935 tikam A Feb. 28, 2024, 4:07 a.m. OK MS C++ 2017 TESTS 5 31 0
248839496 fww A Feb. 29, 2024, 5:54 a.m. OK MS C++ 2017 TESTS 5 46 0
248762453 shivam_tractors A Feb. 28, 2024, 2:16 p.m. OK MS C++ 2017 TESTS 5 46 0
248755176 gullu42 A Feb. 28, 2024, 1:29 p.m. OK MS C++ 2017 TESTS 5 46 0
248751722 Lehotai_Gergely A Feb. 28, 2024, 1:09 p.m. OK MS C++ 2017 TESTS 5 46 0
248761796 maxgotech A Feb. 28, 2024, 2:12 p.m. OK Node.js TESTS 5 62 2252800
248726793 sevonchik A Feb. 28, 2024, 10:27 a.m. OK PyPy 3 TESTS 5 170 5836800
248718675 Yorik123 A Feb. 28, 2024, 9:23 a.m. OK PyPy 3 TESTS 5 171 5427200
248820935 Khatarnak_Khandu A Feb. 29, 2024, 12:13 a.m. OK PyPy 3 TESTS 5 186 5222400
248749175 gerogeVT A Feb. 28, 2024, 12:54 p.m. OK PyPy 3 TESTS 5 187 4915200
248793246 kritagyan A Feb. 28, 2024, 6:06 p.m. OK PyPy 3 TESTS 5 202 4608000
248770509 tejas558 A Feb. 28, 2024, 3:16 p.m. OK PyPy 3 TESTS 5 202 4915200
248759745 AnonY_MouS_CodeR A Feb. 28, 2024, 1:59 p.m. OK PyPy 3 TESTS 5 202 5529600
248755541 yuktaxxx A Feb. 28, 2024, 1:31 p.m. OK PyPy 3 TESTS 5 217 5529600
248731291 i_love_tomatoes A Feb. 28, 2024, 11:01 a.m. OK PyPy 3 TESTS 5 217 5632000
248783685 AntonKorch A Feb. 28, 2024, 4:54 p.m. OK PyPy 3-64 TESTS 5 62 2764800
248766085 N1664 A Feb. 28, 2024, 2:41 p.m. OK PyPy 3-64 TESTS 5 77 2662400
248816471 _aadiupadhyay_ A Feb. 28, 2024, 10:25 p.m. OK PyPy 3-64 TESTS 5 77 2969600
248743718 MaxValgen_ A Feb. 28, 2024, 12:20 p.m. OK PyPy 3-64 TESTS 5 77 3276800
248772938 AntonKorch A Feb. 28, 2024, 3:34 p.m. OK PyPy 3-64 TESTS 5 77 3788800
248687143 Youarenotgood A Feb. 28, 2024, 3:55 a.m. OK PyPy 3-64 TESTS 5 92 4403200
248727994 iedfa A Feb. 28, 2024, 10:37 a.m. OK PyPy 3-64 TESTS 5 93 2355200
248817350 am2503 A Feb. 28, 2024, 10:41 p.m. OK PyPy 3-64 TESTS 5 93 4096000
248785533 nife A Feb. 28, 2024, 5:08 p.m. OK PyPy 3-64 TESTS 5 108 2662400
248764271 Mohamed_Hamed A Feb. 28, 2024, 2:28 p.m. OK PyPy 3-64 TESTS 5 108 3584000
248760962 boogeymanJW A Feb. 28, 2024, 2:07 p.m. OK Python 2 TESTS 5 62 102400
248731117 Charles_LHN A Feb. 28, 2024, 11 a.m. OK Python 3 TESTS 5 31 102400
248812387 hwang41 A Feb. 28, 2024, 9:21 p.m. OK Python 3 TESTS 5 31 102400
248751504 Krish_mittal A Feb. 28, 2024, 1:07 p.m. OK Python 3 TESTS 5 46 0
248781977 manojvn2612 A Feb. 28, 2024, 4:41 p.m. OK Python 3 TESTS 5 46 0
248764017 ankur7891 A Feb. 28, 2024, 2:27 p.m. OK Python 3 TESTS 5 46 0
248824464 hankelse A Feb. 29, 2024, 1:43 a.m. OK Python 3 TESTS 5 46 102400
248839833 TrivialZzy A Feb. 29, 2024, 5:58 a.m. OK Python 3 TESTS 5 46 102400
248837045 anurberdi A Feb. 29, 2024, 5:24 a.m. OK Python 3 TESTS 5 46 102400
248831427 231414 A Feb. 29, 2024, 4:05 a.m. OK Python 3 TESTS 5 46 102400
248827728 Shah.Zaib A Feb. 29, 2024, 2:53 a.m. OK Python 3 TESTS 5 46 102400
248686575 snamy520 A Feb. 28, 2024, 3:47 a.m. OK Rust 2021 TESTS 5 15 0
248804243 Lukiko A Feb. 28, 2024, 7:50 p.m. OK Rust 2021 TESTS 5 15 0
248782185 kokatsu A Feb. 28, 2024, 4:43 p.m. OK Rust 2021 TESTS 5 15 0

remove filters

Back to search problems