Codeforces Round 938 (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
1955 Codeforces Round 938 (Div. 3) FINISHED False 8100 24593063 April 8, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1294 ) H The Most Reckless Defense PROGRAMMING bitmasks brute force constructive algorithms dp flows graph matchings

B'You are playing a very popular Tower Defense game called "Runnerfield 2". In this game, the player sets up defensive towers that attack enemies moving from a certain starting point to the player 's base. You are given a grid of size n x m , on which k towers are already placed and a path is laid out through which enemies will move. The cell at the intersection of the x -th row and the y -th column is denoted as (x, y) . Each second, a tower deals p_i units of damage to all enemies within its range. For example, if an enemy is located at cell (x, y) and a tower is at (x_i, y_i) with a range of r , then the enemy will take damage of p_i if (x - x_i) ^ 2 + (y - y_i) ^ 2 <= r ^ 2 . Enemies move from cell (1, 1) to cell (n, m) , visiting each cell of the path exactly once. An enemy instantly moves to an adjacent cell horizontally or vertically, but before doing so, it spends one second in the current cell. If its health becomes zero or less during this second, the enemy can no longer move. The player loses if an enemy reaches cell (n, m) and can make one more move. By default, all towers have a zero range, but the player can set a tower 's range to an integer r ( r > 0 ), in which case the health of all enemies will increase by 3^r . However, each r can only be used for at most one tower. Suppose an enemy has a base health of h units. If the tower ranges are 2 , 4 , and 5 , then the enemy 's health at the start of the path will be h + 3 ^ 2 + 3 ^ 4 + 3 ^ 5 = h + 9 + 81 + 243 = h + 333 . The choice of ranges is made once before the appearance of enemies and cannot be changed after the game starts. Find the maximum amount of base health h for which it is possible to set the ranges so that the player does not lose when an enemy with health h passes through (without considering the additions for tower ranges). The first line con'...

Tutorials

128243

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
255805746 moyasser333 H April 9, 2024, 2:08 a.m. OK C++14 (GCC 6-32) TESTS 30 124 102400
255777299 Austin_Griffin2 H April 8, 2024, 7:04 p.m. OK C++14 (GCC 6-32) TESTS 30 139 102400
255777990 Austin_Griffin2 H April 8, 2024, 7:10 p.m. OK C++14 (GCC 6-32) TESTS 30 140 102400
255774816 Austin_Griffin2 H April 8, 2024, 6:42 p.m. OK C++14 (GCC 6-32) TESTS 30 140 102400
255771144 Vannn168 H April 8, 2024, 6:12 p.m. OK C++14 (GCC 6-32) TESTS 30 828 102400
255818674 operator_ H April 9, 2024, 4:54 a.m. OK C++14 (GCC 6-32) TESTS 30 1265 102400
255770964 Vannn168 H April 8, 2024, 6:11 p.m. OK C++14 (GCC 6-32) TESTS 30 1624 102400
255802262 pgoq H April 9, 2024, 1:10 a.m. OK C++17 (GCC 7-32) TESTS 30 78 102400
255802885 chaitanya_2408 H April 9, 2024, 1:20 a.m. OK C++17 (GCC 7-32) TESTS 30 140 102400
255802828 licorice-vector H April 9, 2024, 1:19 a.m. OK C++17 (GCC 7-32) TESTS 30 171 102400
255809032 trainerherp H April 9, 2024, 2:54 a.m. OK C++17 (GCC 7-32) TESTS 30 186 164864000
255813829 HHU_fl H April 9, 2024, 3:54 a.m. OK C++17 (GCC 7-32) TESTS 30 187 8704000
255823629 Actium H April 9, 2024, 5:43 a.m. OK C++17 (GCC 7-32) TESTS 30 187 17203200
255823306 Actium H April 9, 2024, 5:40 a.m. OK C++17 (GCC 7-32) TESTS 30 202 17203200
255767223 Anemone_ H April 8, 2024, 5:45 p.m. OK C++17 (GCC 7-32) TESTS 30 264 102400
255780759 devansh789 H April 8, 2024, 7:38 p.m. OK C++17 (GCC 7-32) TESTS 30 265 17920000
255775846 juststay H April 8, 2024, 6:50 p.m. OK C++17 (GCC 7-32) TESTS 30 265 17920000
255803715 enslaved H April 9, 2024, 1:33 a.m. OK C++20 (GCC 13-64) TESTS 30 77 102400
255770555 415411 H April 8, 2024, 6:08 p.m. OK C++20 (GCC 13-64) TESTS 30 77 102400
255770890 415411 H April 8, 2024, 6:10 p.m. OK C++20 (GCC 13-64) TESTS 30 93 102400
255770437 415411 H April 8, 2024, 6:07 p.m. OK C++20 (GCC 13-64) TESTS 30 93 102400
255770342 415411 H April 8, 2024, 6:06 p.m. OK C++20 (GCC 13-64) TESTS 30 93 102400
255774769 familiarize H April 8, 2024, 6:41 p.m. OK C++20 (GCC 13-64) TESTS 30 108 28774400
255811912 luckyblock233 H April 9, 2024, 3:30 a.m. OK C++20 (GCC 13-64) TESTS 30 109 51507200
255811648 luckyblock233 H April 9, 2024, 3:26 a.m. OK C++20 (GCC 13-64) TESTS 30 109 51507200
255770161 415411 H April 8, 2024, 6:05 p.m. OK C++20 (GCC 13-64) TESTS 30 124 102400
255820722 ManInM00N H April 9, 2024, 5:15 a.m. OK C++20 (GCC 13-64) TESTS 30 124 134144000
255774762 man-ray H April 8, 2024, 6:41 p.m. OK Java 21 TESTS 30 702 42700800
255783151 dzhi H April 8, 2024, 8:03 p.m. OK Java 21 TESTS 30 733 44134400
255811843 Zhanzhe_Lee H April 9, 2024, 3:29 a.m. OK Java 21 TESTS 30 1015 1126400
255779615 lyongwolf H April 8, 2024, 7:27 p.m. OK Java 21 TESTS 30 1671 144179200
255801771 theRealChainman H April 9, 2024, 1:01 a.m. OK PyPy 3-64 TESTS 30 1343 11980800
255801875 theRealChainman H April 9, 2024, 1:03 a.m. OK PyPy 3-64 TESTS 30 1358 11980800
255803152 MassimoG H April 9, 2024, 1:24 a.m. OK PyPy 3-64 TESTS 30 2499 11468800
255803206 MassimoG H April 9, 2024, 1:25 a.m. OK PyPy 3-64 TESTS 30 2530 11161600
255781663 AyuAnchor H April 8, 2024, 7:47 p.m. OK PyPy 3-64 TESTS 30 2561 11468800

remove filters

Back to search problems