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 18804299 April 13, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1470 ) E1 Nene vs. Monsters (Easy Version) PROGRAMMING brute force implementation math

B"This is the easy 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 <= 2 cdot 10^5 ) -- 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, bot"...

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
256583483 BlackLily E1 April 14, 2024, 2:29 a.m. OK C++14 (GCC 6-32) TESTS 31 109 819200
256584367 BlackLily E1 April 14, 2024, 2:45 a.m. OK C++14 (GCC 6-32) TESTS 31 109 921600
256532730 Kangaroo_Splay E1 April 13, 2024, 4:23 p.m. OK C++14 (GCC 6-32) TESTS 27 296 4096000
256593186 Austin_Griffin2 E1 April 14, 2024, 5:08 a.m. OK C++14 (GCC 6-32) TESTS 31 312 921600
256530012 _NitroBenzene_ E1 April 13, 2024, 4:17 p.m. OK C++14 (GCC 6-32) TESTS 27 359 1638400
256572593 Humarobot E1 April 13, 2024, 10:50 p.m. OK C++14 (GCC 6-32) TESTS 31 375 102400
256529298 xyloph0nex17 E1 April 13, 2024, 4:15 p.m. OK C++14 (GCC 6-32) TESTS 27 421 2457600
256577516 caoshurui E1 April 14, 2024, 12:38 a.m. OK C++14 (GCC 6-32) TESTS 31 484 1638400
256548784 Yuuuuuuuuuuuuuuuuu E1 April 13, 2024, 6:09 p.m. OK C++14 (GCC 6-32) TESTS 28 546 819200
256585805 tahoangquan2 E1 April 14, 2024, 3:11 a.m. OK C++14 (GCC 6-32) TESTS 31 546 921600
256574806 regain0002 E1 April 13, 2024, 11:38 p.m. OK C++17 (GCC 7-32) TESTS 31 93 819200
256530001 ProjectCF E1 April 13, 2024, 4:17 p.m. OK C++17 (GCC 7-32) TESTS 27 108 1638400
256547570 nifeshe E1 April 13, 2024, 6:01 p.m. OK C++17 (GCC 7-32) TESTS 28 124 102400
256586245 xiaoziyao E1 April 14, 2024, 3:19 a.m. OK C++17 (GCC 7-32) TESTS 31 124 819200
256537982 KroosTheKeenGlint E1 April 13, 2024, 4:33 p.m. OK C++17 (GCC 7-32) TESTS 27 125 1638400
256559572 Clan328 E1 April 13, 2024, 7:43 p.m. OK C++17 (GCC 7-32) TESTS 29 125 4608000
256551442 nifeshe E1 April 13, 2024, 6:28 p.m. OK C++17 (GCC 7-32) TESTS 28 140 102400
256544439 KroosTheKeenGlint E1 April 13, 2024, 5:40 p.m. OK C++17 (GCC 7-32) TESTS 27 155 1638400
256587700 JoesSR_ E1 April 14, 2024, 3:43 a.m. OK C++17 (GCC 7-32) TESTS 31 156 1638400
256543470 caterpillow E1 April 13, 2024, 5:35 p.m. OK C++17 (GCC 7-32) TESTS 27 187 6758400
256584233 mhb2010 E1 April 14, 2024, 2:43 a.m. OK C++20 (GCC 13-64) TESTS 31 78 819200
256549163 kovir_aleksey_korroy E1 April 13, 2024, 6:12 p.m. OK C++20 (GCC 13-64) TESTS 28 93 102400
256548738 kovir_aleksey_korroy E1 April 13, 2024, 6:09 p.m. OK C++20 (GCC 13-64) TESTS 28 93 102400
256548528 kovir_aleksey_korroy E1 April 13, 2024, 6:08 p.m. OK C++20 (GCC 13-64) TESTS 28 93 102400
256548928 kovir_aleksey_korroy E1 April 13, 2024, 6:10 p.m. OK C++20 (GCC 13-64) TESTS 28 108 102400
256593203 -XXP- E1 April 14, 2024, 5:08 a.m. OK C++20 (GCC 13-64) TESTS 31 108 3276800
256544767 physics0523 E1 April 13, 2024, 5:42 p.m. OK C++20 (GCC 13-64) TESTS 27 109 102400
256565857 SuperJ6 E1 April 13, 2024, 8:57 p.m. OK C++20 (GCC 13-64) TESTS 31 109 819200
256591122 Cogegallinas E1 April 14, 2024, 4:38 a.m. OK C++20 (GCC 13-64) TESTS 31 109 2662400
256531463 xd_goodgame E1 April 13, 2024, 4:20 p.m. OK C++20 (GCC 13-64) TESTS 27 109 8089600
256534773 synasc E1 April 13, 2024, 4:27 p.m. OK Java 21 TESTS 27 1874 1638400
256546647 vatsal_04 E1 April 13, 2024, 5:54 p.m. OK Java 8 TESTS 28 781 2662400
256552697 formidablechief27 E1 April 13, 2024, 6:38 p.m. OK Java 8 TESTS 28 1249 86937600
256548129 cybsbbb E1 April 13, 2024, 6:04 p.m. OK PyPy 3-64 TESTS 28 655 25907200
256532244 youngbrandon007 E1 April 13, 2024, 4:22 p.m. OK PyPy 3-64 TESTS 27 702 24678400
256571363 golomb E1 April 13, 2024, 10:25 p.m. OK PyPy 3-64 TESTS 31 1265 21913600
256553112 huikang E1 April 13, 2024, 6:41 p.m. OK PyPy 3-64 TESTS 28 1389 23244800
256544789 PROELECTRO444 E1 April 13, 2024, 5:42 p.m. OK PyPy 3-64 TESTS 27 1718 24268800
256587185 Rumors E1 April 14, 2024, 3:35 a.m. OK PyPy 3-64 TESTS 31 1874 32051200
256531843 apilat E1 April 13, 2024, 4:21 p.m. OK Rust 2021 TESTS 27 687 102400
256558048 n685 E1 April 13, 2024, 7:27 p.m. OK Rust 2021 TESTS 29 1874 409600

remove filters

Back to search problems