Codeforces Round 884 (Div. 1 + 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
1844 Codeforces Round 884 (Div. 1 + Div. 2) FINISHED False 10800 48180263 July 11, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 16213 ) C Particles PROGRAMMING constructive algorithms greedy implementation math

B'You have discovered n mysterious particles on a line with integer charges of c_1, ... ,c_n . You have a device that allows you to perform the following operation: For example, if the line of particles had charges of [-3,1,4,-1,5,-9] , performing the operation on the 4 th particle will transform the line into [-3,1,9,-9] . If we then use the device on the 1 st particle in this new line, the line will turn into [1,9,-9] . You will perform operations until there is only one particle left. What is the maximum charge of this remaining particle that you can obtain? Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 10^4 ). The description of the test cases follows. The first line of each test case contains a single integer n ( 1 <= n <= 2 cdot 10^5 ). The second line of each test case contains n integers c_1, ... ,c_n ( -10^9 <= c_i <= 10^9 ). It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, output one integer, the maximum charge of the remaining particle. In the first test case, the best strategy is to use the device on the 4 th particle, then on the 1 st particle (as described in the statement), and finally use the device on the new 3 rd particle followed by the 1 st particle. In the second test case, the best strategy is to use the device on the 4 th particle to transform the line into [998244353,998244353,1996488706] , then on the 2 nd particle to transform the line into [2994733059] . Be wary of integer overflow. In the third test case, there is only one particle, so no operations can be performed. '...

Tutorials

Codeforces Round #884 (Div. 1 + Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
213438409 lAMaLOSER C July 12, 2023, 1:37 a.m. OK C# 10 TESTS 12 124 30924800
213399194 ruban C July 11, 2023, 5:25 p.m. OK Delphi TESTS 12 78 11366400
213404756 CaveNightingale C July 11, 2023, 6:05 p.m. OK GNU C11 TESTS 12 46 1638400
213454372 iffatul_anon C July 12, 2023, 5:21 a.m. OK GNU C11 TESTS 12 78 0
213455460 amijeet-g C July 12, 2023, 5:38 a.m. OK GNU C11 TESTS 12 93 1638400
213454217 iffatul_anon C July 12, 2023, 5:18 a.m. OK GNU C11 TESTS 12 109 1638400
213425490 MohamedSameh C July 11, 2023, 9:47 p.m. OK GNU C++14 TESTS 12 62 0
213407731 musa23 C July 11, 2023, 6:22 p.m. OK GNU C++14 TESTS 12 62 819200
213405557 zhs12345 C July 11, 2023, 6:09 p.m. OK GNU C++14 TESTS 12 62 819200
213399560 B3Q C July 11, 2023, 5:26 p.m. OK GNU C++14 TESTS 12 62 819200
213397066 The-Winner C July 11, 2023, 5:18 p.m. OK GNU C++14 TESTS 12 62 819200
213427775 RootMirzayanov C July 11, 2023, 10:30 p.m. OK GNU C++14 TESTS 12 62 819200
213433978 ky_alt C July 12, 2023, 12:38 a.m. OK GNU C++14 TESTS 12 62 819200
213453221 CuteJerry C July 12, 2023, 5:02 a.m. OK GNU C++14 TESTS 12 62 819200
213444386 lelml C July 12, 2023, 2:47 a.m. OK GNU C++14 TESTS 12 62 819200
213452392 nisthasinghindore C July 12, 2023, 4:49 a.m. OK GNU C++14 TESTS 12 62 1638400
213393493 st0ic C July 11, 2023, 5:06 p.m. OK GNU C++17 TESTS 12 61 15974400
213418905 the_computer_jock C July 11, 2023, 8:13 p.m. OK GNU C++17 TESTS 12 62 0
213409564 Nada_A7med C July 11, 2023, 6:35 p.m. OK GNU C++17 TESTS 12 62 0
213449671 Jus1t C July 12, 2023, 4:02 a.m. OK GNU C++17 TESTS 12 62 0
213433604 karelispanagiotis C July 12, 2023, 12:32 a.m. OK GNU C++17 TESTS 12 62 0
213454550 vinren C July 12, 2023, 5:23 a.m. OK GNU C++17 TESTS 12 62 0
213451535 tetr.io C July 12, 2023, 4:35 a.m. OK GNU C++17 TESTS 12 62 0
213455330 ys_yuvraj C July 12, 2023, 5:36 a.m. OK GNU C++17 TESTS 12 62 819200
213455775 sgfc C July 12, 2023, 5:42 a.m. OK GNU C++17 TESTS 12 62 819200
213452737 Jahid_Hasan10 C July 12, 2023, 4:54 a.m. OK GNU C++17 TESTS 12 62 819200
213422600 jerefigo C July 11, 2023, 8:58 p.m. OK GNU C++17 (64) TESTS 12 46 0
213395824 sischu74 C July 11, 2023, 5:14 p.m. OK GNU C++17 (64) TESTS 12 46 0
213453264 Niloy_Das_19 C July 12, 2023, 5:03 a.m. OK GNU C++17 (64) TESTS 12 46 0
213399647 Hamine C July 11, 2023, 5:26 p.m. OK GNU C++17 (64) TESTS 12 46 819200
213448516 czswez C July 12, 2023, 3:44 a.m. OK GNU C++17 (64) TESTS 12 46 819200
213424194 enslaved C July 11, 2023, 9:23 p.m. OK GNU C++17 (64) TESTS 12 46 819200
213413111 bashkort C July 11, 2023, 7:07 p.m. OK GNU C++17 (64) TESTS 12 46 819200
213450055 Alex_Wei C July 12, 2023, 4:09 a.m. OK GNU C++17 (64) TESTS 12 46 1024000
213434930 youssefmontaser C July 12, 2023, 12:52 a.m. OK GNU C++17 (64) TESTS 12 46 1638400
213437309 PHarr_ C July 12, 2023, 1:22 a.m. OK GNU C++17 (64) TESTS 12 46 1638400
213423918 Sassooo C July 11, 2023, 9:19 p.m. OK GNU C++20 (64) TESTS 12 31 0
213422563 amr_amin C July 11, 2023, 8:58 p.m. OK GNU C++20 (64) TESTS 12 31 0
213421764 bibikov1 C July 11, 2023, 8:48 p.m. OK GNU C++20 (64) TESTS 12 31 0
213420854 ahmedsalah141014 C July 11, 2023, 8:36 p.m. OK GNU C++20 (64) TESTS 12 31 0
213415178 SaifullahMnsur C July 11, 2023, 7:30 p.m. OK GNU C++20 (64) TESTS 12 31 0
213413522 TANJIR0U C July 11, 2023, 7:11 p.m. OK GNU C++20 (64) TESTS 12 31 0
213441887 bigJ C July 12, 2023, 2:19 a.m. OK GNU C++20 (64) TESTS 12 31 0
213441242 Themaver1cks C July 12, 2023, 2:11 a.m. OK GNU C++20 (64) TESTS 12 31 0
213439707 alittleprincess C July 12, 2023, 1:53 a.m. OK GNU C++20 (64) TESTS 12 31 0
213431016 ZOORO C July 11, 2023, 11:42 p.m. OK GNU C++20 (64) TESTS 12 31 0
213447406 zyf123 C July 12, 2023, 3:27 a.m. OK Go TESTS 12 109 4710400
213445311 Slido369 C July 12, 2023, 2:57 a.m. OK Java 11 TESTS 12 202 3072000
213414614 Pranav_Sharda C July 11, 2023, 7:23 p.m. OK Java 11 TESTS 12 218 4096000
213421287 himanshu19468 C July 11, 2023, 8:41 p.m. OK Java 11 TESTS 12 233 3891200
213392299 Hsharma C July 11, 2023, 5:02 p.m. OK Java 11 TESTS 12 249 4300800
213410871 butteronpoptart C July 11, 2023, 6:46 p.m. OK Java 11 TESTS 12 280 3891200
213404509 themadknight45 C July 11, 2023, 6:04 p.m. OK Java 11 TESTS 12 280 5120000
213402091 PlayDate C July 11, 2023, 5:34 p.m. OK Java 11 TESTS 12 576 0
213402073 mayankh250811 C July 11, 2023, 5:34 p.m. OK Java 11 TESTS 12 576 0
213400633 farhatsnigdho C July 11, 2023, 5:29 p.m. OK Java 11 TESTS 12 577 0
213394707 vvishal_05 C July 11, 2023, 5:10 p.m. OK Java 11 TESTS 12 623 0
213446438 chuquwan9964 C July 12, 2023, 3:14 a.m. OK Java 17 TESTS 12 202 819200
213422343 Vrutik_2809 C July 11, 2023, 8:55 p.m. OK Java 17 TESTS 12 217 5734400
213443719 LucunJi C July 12, 2023, 2:40 a.m. OK Java 17 TESTS 12 234 512000
213411761 aishwarykesarwani C July 11, 2023, 6:54 p.m. OK Java 17 TESTS 12 249 3788800
213415477 Danger_Don C July 11, 2023, 7:33 p.m. OK Java 17 TESTS 12 249 5017600
213456711 andreiDoro C July 12, 2023, 5:57 a.m. OK Java 17 TESTS 12 264 4096000
213393674 GojoSatoru C July 11, 2023, 5:06 p.m. OK Java 17 TESTS 12 296 22118400
213411443 Pratham2908 C July 11, 2023, 6:51 p.m. OK Java 17 TESTS 12 311 8499200
213412995 codebook_2000 C July 11, 2023, 7:06 p.m. OK Java 17 TESTS 12 327 23756800
213451552 Biubiu0919 C July 12, 2023, 4:36 a.m. OK Java 17 TESTS 12 546 921600
213397561 RahulAhuja2901 C July 11, 2023, 5:19 p.m. OK Java 8 TESTS 12 124 0
213421455 grandeur19919 C July 11, 2023, 8:43 p.m. OK Java 8 TESTS 12 155 11366400
213418870 iamdimonis C July 11, 2023, 8:12 p.m. OK Java 8 TESTS 12 171 12800000
213419693 molecule03 C July 11, 2023, 8:21 p.m. OK Java 8 TESTS 12 171 67993600
213406593 lpychemistry C July 11, 2023, 6:15 p.m. OK Java 8 TESTS 12 186 0
213392206 luxemburger C July 11, 2023, 5:02 p.m. OK Java 8 TESTS 12 218 12902400
213450428 harry1995 C July 12, 2023, 4:16 a.m. OK Java 8 TESTS 12 218 15974400
213445675 ak472003 C July 12, 2023, 3:03 a.m. OK Java 8 TESTS 12 389 0
213439577 ak472003 C July 12, 2023, 1:51 a.m. OK Java 8 TESTS 12 389 0
213446553 ak472003 C July 12, 2023, 3:16 a.m. OK Java 8 TESTS 12 420 0
213397375 balajirudrawar123 C July 11, 2023, 5:19 p.m. OK Kotlin 1.7 TESTS 12 997 109158400
213398075 Its_PS C July 11, 2023, 5:21 p.m. OK MS C++ 2017 TESTS 12 264 1638400
213393404 PRO_A C July 11, 2023, 5:06 p.m. OK MS C++ 2017 TESTS 12 265 1638400
213428083 liupengsay C July 11, 2023, 10:36 p.m. OK PyPy 3 TESTS 12 326 24166400
213406516 Yash_Nandwana C July 11, 2023, 6:14 p.m. OK PyPy 3 TESTS 12 327 20684800
213397749 conqueror_of_womais C July 11, 2023, 5:20 p.m. OK PyPy 3 TESTS 12 342 20480000
213428281 liupengsay C July 11, 2023, 10:40 p.m. OK PyPy 3 TESTS 12 342 23859200
213414552 jvatsal0709 C July 11, 2023, 7:23 p.m. OK PyPy 3 TESTS 12 499 19046400
213440841 InHng C July 12, 2023, 2:06 a.m. OK PyPy 3 TESTS 12 514 19046400
213441661 InHng C July 12, 2023, 2:17 a.m. OK PyPy 3 TESTS 12 514 19251200
213416883 Duckling69 C July 11, 2023, 7:48 p.m. OK PyPy 3 TESTS 12 623 18944000
213439606 4D4CH1 C July 12, 2023, 1:52 a.m. OK PyPy 3-64 TESTS 12 124 30208000
213408977 Super_Misha C July 11, 2023, 6:31 p.m. OK PyPy 3-64 TESTS 12 139 26931200
213399342 Marquis03 C July 11, 2023, 5:25 p.m. OK PyPy 3-64 TESTS 12 140 27136000
213430324 RobinFromTheHood C July 11, 2023, 11:27 p.m. OK PyPy 3-64 TESTS 12 140 30412800
213421397 aspiringquant C July 11, 2023, 8:43 p.m. OK PyPy 3-64 TESTS 12 140 31436800
213409563 SoleProprietor C July 11, 2023, 6:35 p.m. OK PyPy 3-64 TESTS 12 140 31539200
213448938 broshen C July 12, 2023, 3:51 a.m. OK PyPy 3-64 TESTS 12 155 28467200
213426307 RobinFromTheHood C July 11, 2023, 10:01 p.m. OK PyPy 3-64 TESTS 12 155 31129600
213405418 CinaDor C July 11, 2023, 6:09 p.m. OK PyPy 3-64 TESTS 12 155 31539200
213394870 alok_yg C July 11, 2023, 5:10 p.m. OK PyPy 3-64 TESTS 12 155 31539200
213416984 MutedSolace C July 11, 2023, 7:49 p.m. OK Python 3 TESTS 12 124 28672000
213452787 vasudha_1610 C July 12, 2023, 4:55 a.m. OK Python 3 TESTS 12 139 28672000
213449650 chewbacca2611 C July 12, 2023, 4:02 a.m. OK Python 3 TESTS 12 171 26214400
213440812 CF_Soumyajit C July 12, 2023, 2:06 a.m. OK Python 3 TESTS 12 186 28672000
213415917 Asharma538 C July 11, 2023, 7:37 p.m. OK Python 3 TESTS 12 186 28672000
213392847 Pratham_2021347 C July 11, 2023, 5:04 p.m. OK Python 3 TESTS 12 186 28672000
213401168 SIGCHLD C July 11, 2023, 5:31 p.m. OK Python 3 TESTS 12 187 28364800
213394980 CMRIT25_21R01A05C0 C July 11, 2023, 5:11 p.m. OK Python 3 TESTS 12 187 28672000
213404771 sleepingonee C July 11, 2023, 6:05 p.m. OK Python 3 TESTS 12 202 26214400
213445008 abhinavn004 C July 12, 2023, 2:53 a.m. OK Python 3 TESTS 12 202 27033600
213393364 vivek__jaiswal C July 11, 2023, 5:05 p.m. OK Ruby 3 TESTS 12 514 21401600
213449723 cpchenpi C July 12, 2023, 4:04 a.m. OK Rust 2021 TESTS 12 15 1740800
213398237 robostac C July 11, 2023, 5:22 p.m. OK Rust 2021 TESTS 12 30 7884800
213436606 YummyPie C July 12, 2023, 1:14 a.m. OK Rust 2021 TESTS 12 46 6348800

remove filters

Back to search problems