Codeforces Round 939 (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
1956 Codeforces Round 939 (Div. 2) FINISHED False 7200 24161063 April 13, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 914 ) E2 Nene vs. Monsters (Hard Version) PROGRAMMING brute force implementation math

B"This is the hard version of the problem. The only difference between the versions is the constraints on a_i . You can make hacks only if both versions of the problem are solved. Nene is fighting with n monsters, located in a circle. These monsters are numbered from 1 to n , and the i -th ( 1 <= i <= n ) monster's current energy level is a_i . Since the monsters are too strong, Nene decided to fight with them using the Attack Your Neighbour spell. When Nene uses this spell, the following actions happen in the following order one by one: When the monster with energy level x attacks the monster with the energy level y , the energy level of the defending monster becomes max(0, y-x) (the energy level of the attacking monster remains equal to x ). Nene is going to use this spell 10^{100} times and deal with the monsters that will still have a non-zero energy level herself. She wants you to determine which monsters will have a non-zero energy level once she will use the described spell 10^{100} times. Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 10^4 ). The description of test cases follows. The first line contains a single integer n ( 2 <= n <= 2 cdot 10^5 ) -- the number of monsters. The second line contains n integers a_1, a_2, ldots, a_n ( 0 <= a_i <= 10^9 ) -- the current energy levels of monsters. It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, If m=0 , you may either output an empty line or don't output it. In the first test case, the following actions happen during the first 3 uses of the spell in this order: After each of the next uses of the spell, energy levels of monsters do not change. Thus, only the 1 -st monster has a non-zero energy level in the end. In the second test case, both monste"...

Tutorials

[Editorial] Codeforces Round 939 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
256593913 _MyGO_Tomori_ E2 April 14, 2024, 5:18 a.m. OK C++14 (GCC 6-32) TESTS 62 859 921600
256531940 Inexhaustible_ E2 April 13, 2024, 4:21 p.m. OK C++14 (GCC 6-32) TESTS 55 953 819200
256577047 Survivor_winner E2 April 14, 2024, 12:28 a.m. OK C++14 (GCC 6-32) TESTS 61 1249 3276800
256584283 BlackLily E2 April 14, 2024, 2:44 a.m. OK C++14 (GCC 6-32) TESTS 61 1280 921600
256584036 BlackLily E2 April 14, 2024, 2:40 a.m. OK C++14 (GCC 6-32) TESTS 61 1936 921600
256559853 Clan328 E2 April 13, 2024, 7:46 p.m. OK C++17 (GCC 7-32) TESTS 58 139 2764800
256559496 Clan328 E2 April 13, 2024, 7:43 p.m. OK C++17 (GCC 7-32) TESTS 58 140 4608000
256592134 yashsharda E2 April 14, 2024, 4:54 a.m. OK C++17 (GCC 7-32) TESTS 62 186 102400
256538044 KroosTheKeenGlint E2 April 13, 2024, 4:33 p.m. OK C++17 (GCC 7-32) TESTS 55 265 1638400
256588137 JoesSR_ E2 April 14, 2024, 3:50 a.m. OK C++17 (GCC 7-32) TESTS 62 343 1638400
256594229 Superposition E2 April 14, 2024, 5:22 a.m. OK C++17 (GCC 7-32) TESTS 62 374 0
256582941 Tobo E2 April 14, 2024, 2:20 a.m. OK C++17 (GCC 7-32) TESTS 61 374 0
256594176 Superposition E2 April 14, 2024, 5:21 a.m. OK C++17 (GCC 7-32) TESTS 62 468 102400
256587763 undercat E2 April 14, 2024, 3:44 a.m. OK C++17 (GCC 7-32) TESTS 62 781 819200
256584506 GOTKAKO E2 April 14, 2024, 2:48 a.m. OK C++17 (GCC 7-32) TESTS 61 828 0
256571640 GusFring E2 April 13, 2024, 10:30 p.m. OK C++20 (GCC 13-64) TESTS 61 109 102400
256571602 GusFring E2 April 13, 2024, 10:30 p.m. OK C++20 (GCC 13-64) TESTS 61 109 102400
256571537 GusFring E2 April 13, 2024, 10:28 p.m. OK C++20 (GCC 13-64) TESTS 61 109 102400
256566371 SuperJ6 E2 April 13, 2024, 9:04 p.m. OK C++20 (GCC 13-64) TESTS 61 109 819200
256571870 GusFring E2 April 13, 2024, 10:35 p.m. OK C++20 (GCC 13-64) TESTS 61 124 102400
256566055 SuperJ6 E2 April 13, 2024, 8:59 p.m. OK C++20 (GCC 13-64) TESTS 61 124 819200
256566020 SuperJ6 E2 April 13, 2024, 8:59 p.m. OK C++20 (GCC 13-64) TESTS 61 124 819200
256571519 GusFring E2 April 13, 2024, 10:28 p.m. OK C++20 (GCC 13-64) TESTS 61 140 102400
256565942 SuperJ6 E2 April 13, 2024, 8:58 p.m. OK C++20 (GCC 13-64) TESTS 61 140 819200
256571485 GusFring E2 April 13, 2024, 10:27 p.m. OK C++20 (GCC 13-64) TESTS 61 155 102400
256530939 toomer E2 April 13, 2024, 4:19 p.m. OK Rust 2021 TESTS 55 1328 3686400

remove filters

Back to search problems