Codeforces Round 533 (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
1105 Codeforces Round 533 (Div. 2) FINISHED False 7200 189453287 Jan. 20, 2019, 12:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4197 ) D Kilani and the Game PROGRAMMING dfs and similar graphs implementation shortest paths 1900

B"Kilani is playing a game with his friends. This game can be represented as a grid of size n x m , where each cell is either empty or blocked, and every player has one or more castles in some cells (there are no two castles in one cell). The game is played in rounds. In each round players expand turn by turn: firstly, the first player expands, then the second player expands and so on. The expansion happens as follows: for each castle the player owns now, he tries to expand into the empty cells nearby. The player i can expand from a cell with his castle to the empty cell if it's possible to reach it in at most s_i (where s_i is player's expansion speed) moves to the left, up, right or down without going through blocked cells or cells occupied by some other player's castle. The player examines the set of cells he can expand to and builds a castle in each of them at once. The turned is passed to the next player after that. The game ends when no player can make a move. You are given the game field and speed of the expansion for each player. Kilani wants to know for each player how many cells he will control (have a castle their) after the game ends. The first line contains three integers n , m and p ( 1 <= n, m <= 1000 , 1 <= p <= 9 ) -- the size of the grid and the number of players. The second line contains p integers s_i ( 1 <= s <= 10^9 ) -- the speed of the expansion for every player. The following n lines describe the game grid. Each of them consists of m symbols, where '.' denotes an empty cell, '#' denotes a blocked cell and digit x ( 1 <= x <= p ) denotes the castle owned by player x . It is guaranteed, that each player has at least one castle on the grid. Print p integers -- the number of cells controlled by each player after the game ends. The picture below show the game before it started, the game after the first round and game after"...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
51852973 chaorenhaha D March 26, 2019, 9:08 a.m. OK FPC TESTS 46 155 245555200 1900
48687617 s0199988819 D Jan. 21, 2019, 4:02 p.m. OK GNU C11 TESTS 45 31 84172800 1900
48710969 Bramble D Jan. 22, 2019, 8:30 a.m. OK GNU C11 TESTS 45 62 73011200 1900
57788939 vjudge1 D July 26, 2019, 8:47 a.m. OK GNU C++11 TESTS 46 31 15052800 1900
48680410 MyVegetableHasExploded D Jan. 21, 2019, 1:03 p.m. OK GNU C++11 TESTS 45 31 27238400 1900
48653655 backup_noob D Jan. 21, 2019, 12:50 a.m. OK GNU C++11 TESTS 45 46 5427200 1900
48632650 akakw1 D Jan. 20, 2019, 1:36 p.m. OK GNU C++11 TESTS 45 46 7372800 1900
48894086 vjudge4 D Jan. 24, 2019, 3:09 p.m. OK GNU C++11 TESTS 46 46 7372800 1900
48652822 yijan D Jan. 20, 2019, 11:45 p.m. OK GNU C++11 TESTS 45 46 7372800 1900
48640764 Moments_ D Jan. 20, 2019, 3:21 p.m. OK GNU C++11 TESTS 45 46 7475200 1900
49396416 Memory_of_winter D Feb. 3, 2019, 12:34 p.m. OK GNU C++11 TESTS 46 46 7475200 1900
48639397 racoon D Jan. 20, 2019, 3 p.m. OK GNU C++11 TESTS 45 46 7577600 1900
66447498 vjudge4 D Dec. 7, 2019, 10:13 a.m. OK GNU C++11 TESTS 46 46 7680000 1900
48667914 ZERO. D Jan. 21, 2019, 9:03 a.m. OK GNU C++14 TESTS 45 46 7577600 1900
48647393 gfonn D Jan. 20, 2019, 6:18 p.m. OK GNU C++14 TESTS 45 46 7577600 1900
48643124 guanaco96 D Jan. 20, 2019, 4:07 p.m. OK GNU C++14 TESTS 45 46 7577600 1900
48673460 Kausal D Jan. 21, 2019, 10:53 a.m. OK GNU C++14 TESTS 45 46 7577600 1900
48630219 MasT_ D Jan. 20, 2019, 1:23 p.m. OK GNU C++14 TESTS 45 46 7577600 1900
48675746 shreyansh D Jan. 21, 2019, 11:25 a.m. OK GNU C++14 TESTS 45 46 7577600 1900
48630596 poirin D Jan. 20, 2019, 1:25 p.m. OK GNU C++14 TESTS 45 46 7577600 1900
48666075 Humanoid D Jan. 21, 2019, 8:13 a.m. OK GNU C++14 TESTS 45 46 7680000 1900
49908818 hank55663 D Feb. 14, 2019, 1:14 p.m. OK GNU C++14 TESTS 46 46 7782400 1900
49859162 Robbinb1993 D Feb. 13, 2019, 8:41 a.m. OK GNU C++14 TESTS 46 46 7782400 1900
54550363 vjudge4 D May 24, 2019, 8:44 a.m. OK GNU C++17 TESTS 46 31 7782400 1900
48702754 vjudge5 D Jan. 22, 2019, 3:55 a.m. OK GNU C++17 TESTS 45 46 7577600 1900
52526713 TGG D April 9, 2019, 11:47 a.m. OK GNU C++17 TESTS 46 46 7782400 1900
49746593 JT1123 D Feb. 10, 2019, 10:08 p.m. OK GNU C++17 TESTS 46 46 7782400 1900
48790729 xuziye0327 D Jan. 23, 2019, 11:13 a.m. OK GNU C++17 TESTS 46 46 7782400 1900
48666259 wangsili D Jan. 21, 2019, 8:18 a.m. OK GNU C++17 TESTS 45 46 7782400 1900
48640554 Ghost0fSparta D Jan. 20, 2019, 3:17 p.m. OK GNU C++17 TESTS 45 46 7782400 1900
64676849 happy_ D Nov. 11, 2019, 8:23 a.m. OK GNU C++17 TESTS 46 46 7782400 1900
53004264 theSkynet D April 19, 2019, 8:46 a.m. OK GNU C++17 TESTS 46 46 7782400 1900
69937489 rhubarb24 D Feb. 1, 2020, 4:45 a.m. OK GNU C++17 TESTS 46 46 7987200 1900
48627389 caidodo0_0 D Jan. 20, 2019, 1:09 p.m. OK Go TESTS 45 156 32051200 1900
49193954 UnconfSlnce D Jan. 30, 2019, 9:29 a.m. OK Go TESTS 46 280 40960000 1900
48655836 gksato D Jan. 21, 2019, 2:34 a.m. OK Haskell TESTS 45 186 13824000 1900
64744059 IslamTalipovTop D Nov. 12, 2019, 12:56 p.m. OK Java 11 TESTS 46 1496 53452800 1900
48646750 Darth_Jar_Jar_Binks D Jan. 20, 2019, 5:56 p.m. OK Java 8 TESTS 45 186 64716800 1900
48687336 Anonymous D Jan. 21, 2019, 3:55 p.m. OK Java 8 TESTS 45 218 28979200 1900
48716196 polyakoff D Jan. 22, 2019, 11:23 a.m. OK Java 8 TESTS 45 218 33177600 1900
53767135 martins D May 5, 2019, 1:27 a.m. OK Java 8 TESTS 46 233 27136000 1900
59494594 Jarik D Aug. 25, 2019, 9:09 p.m. OK Java 8 TESTS 46 233 33177600 1900
48716001 polyakoff D Jan. 22, 2019, 11:17 a.m. OK Java 8 TESTS 45 233 39321600 1900
48657981 just_soso D Jan. 21, 2019, 4:14 a.m. OK Java 8 TESTS 45 249 19046400 1900
53767138 vjudge5 D May 5, 2019, 1:27 a.m. OK Java 8 TESTS 46 249 27136000 1900
48631690 Suunn D Jan. 20, 2019, 1:31 p.m. OK Java 8 TESTS 45 249 31232000 1900
48719269 coderbond007 D Jan. 22, 2019, 12:48 p.m. OK Java 8 TESTS 46 249 32460800 1900
60364232 Tigmah D Sept. 10, 2019, 7:52 p.m. OK Kotlin TESTS 46 623 78028800 1900
60406369 Tigmah D Sept. 11, 2019, 6:51 p.m. OK Kotlin TESTS 46 623 87449600 1900
60376862 Tigmah D Sept. 11, 2019, 7:03 a.m. OK Kotlin TESTS 46 639 78028800 1900
60382402 Tigmah D Sept. 11, 2019, 9:51 a.m. OK Kotlin TESTS 46 654 87449600 1900
48630927 T-D-K D Jan. 20, 2019, 1:27 p.m. OK Mono C# TESTS 45 124 24883200 1900
48666906 omikad D Jan. 21, 2019, 8:35 a.m. OK Mono C# TESTS 45 124 30208000 1900
48925630 Mem D Jan. 25, 2019, 10:16 a.m. OK Mono C# TESTS 46 217 35532800 1900
48643857 selpo D Jan. 20, 2019, 4:27 p.m. OK Mono C# TESTS 45 264 29081600 1900
48643707 selpo D Jan. 20, 2019, 4:23 p.m. OK Mono C# TESTS 45 265 29081600 1900
48644256 selpo D Jan. 20, 2019, 4:38 p.m. OK Mono C# TESTS 45 280 29081600 1900
48630926 kuuso D Jan. 20, 2019, 1:27 p.m. OK Mono C# TESTS 45 296 33382400 1900
48650250 ykurmangaliyev D Jan. 20, 2019, 8:15 p.m. OK Mono C# TESTS 45 296 50585600 1900
49558256 eki D Feb. 7, 2019, 11:03 a.m. OK Mono C# TESTS 46 374 49049600 1900
49060590 _SHREDDER_ D Jan. 27, 2019, 3:16 p.m. OK Mono C# TESTS 46 795 68300800 1900
50786690 vjudge4 D March 4, 2019, 1:39 p.m. OK MS C++ TESTS 46 62 16896000 1900
48643359 SAUPeking D Jan. 20, 2019, 4:14 p.m. OK MS C++ TESTS 45 77 22528000 1900
56787332 vjudge4 D July 10, 2019, 9 a.m. OK MS C++ TESTS 46 78 18329600 1900
51578383 Yanhui D March 20, 2019, 1:41 p.m. OK MS C++ TESTS 46 93 14233600 1900
51578321 vjudge5 D March 20, 2019, 1:40 p.m. OK MS C++ TESTS 46 93 14233600 1900
49014588 vjudge2 D Jan. 26, 2019, 4:56 p.m. OK MS C++ TESTS 46 93 15564800 1900
48661081 dyxx D Jan. 21, 2019, 6:03 a.m. OK MS C++ TESTS 45 93 21913600 1900
48677803 wuzj D Jan. 21, 2019, 12:14 p.m. OK MS C++ TESTS 45 93 24473600 1900
48896930 vjudge3 D Jan. 24, 2019, 4:18 p.m. OK MS C++ TESTS 46 93 27648000 1900
49490848 vjudge5 D Feb. 5, 2019, 9:43 a.m. OK MS C++ TESTS 46 108 34406400 1900
57595368 pmitkov D July 23, 2019, 1:45 p.m. OK MS C++ 2017 TESTS 46 78 20992000 1900
59946399 vjudge1 D Sept. 3, 2019, 1:08 p.m. OK MS C++ 2017 TESTS 46 93 14028800 1900
50067173 nomiku99 D Feb. 17, 2019, 3:26 p.m. OK MS C++ 2017 TESTS 46 93 19660800 1900
51368313 AleksanderBalobanov D March 16, 2019, 10:46 a.m. OK MS C++ 2017 TESTS 46 108 25292800 1900
61897801 dungdungDaddy D Oct. 5, 2019, 7:44 a.m. OK MS C++ 2017 TESTS 46 171 45670400 1900
52761198 SendThemToHell D April 14, 2019, 8:55 p.m. OK MS C++ 2017 TESTS 46 186 26624000 1900
57223378 sladkayaKlubnichka D July 17, 2019, 3:32 p.m. OK MS C++ 2017 TESTS 46 233 31436800 1900
57874266 Saber_Altria D July 28, 2019, 4:10 a.m. OK MS C++ 2017 TESTS 46 264 28160000 1900
61854073 dungdungDaddy D Oct. 4, 2019, 1:34 p.m. OK MS C++ 2017 TESTS 46 296 46694400 1900
53286801 cheng222 D April 25, 2019, 2:11 p.m. OK MS C++ 2017 TESTS 46 374 46182400 1900
48689530 pajenegod D Jan. 21, 2019, 4:56 p.m. OK PyPy 2 TESTS 45 311 42905600 1900
48689888 pajenegod D Jan. 21, 2019, 5:10 p.m. OK PyPy 2 TESTS 45 326 43008000 1900
48690000 pajenegod D Jan. 21, 2019, 5:14 p.m. OK PyPy 2 TESTS 45 327 40448000 1900
48765243 pajenegod D Jan. 22, 2019, 7:02 p.m. OK PyPy 2 TESTS 46 342 43008000 1900
48688250 pajenegod D Jan. 21, 2019, 4:20 p.m. OK PyPy 2 TESTS 45 342 43110400 1900
48686747 pajenegod D Jan. 21, 2019, 3:39 p.m. OK PyPy 2 TESTS 45 358 26214400 1900
48687249 pajenegod D Jan. 21, 2019, 3:52 p.m. OK PyPy 2 TESTS 45 358 27545600 1900
48687962 pajenegod D Jan. 21, 2019, 4:11 p.m. OK PyPy 2 TESTS 45 373 27443200 1900
48687163 pajenegod D Jan. 21, 2019, 3:50 p.m. OK PyPy 2 TESTS 45 374 27340800 1900
48687018 pajenegod D Jan. 21, 2019, 3:46 p.m. OK PyPy 2 TESTS 45 374 27340800 1900
48688272 pajenegod D Jan. 21, 2019, 4:20 p.m. OK PyPy 3 TESTS 45 358 44134400 1900
48689922 pajenegod D Jan. 21, 2019, 5:11 p.m. OK PyPy 3 TESTS 45 358 44236800 1900
48690018 pajenegod D Jan. 21, 2019, 5:15 p.m. OK PyPy 3 TESTS 45 389 40755200 1900
48686805 pajenegod D Jan. 21, 2019, 3:41 p.m. OK PyPy 3 TESTS 45 405 26316800 1900
48687307 pajenegod D Jan. 21, 2019, 3:54 p.m. OK PyPy 3 TESTS 45 436 29286400 1900
48656246 pajenegod D Jan. 21, 2019, 2:50 a.m. OK PyPy 3 TESTS 45 560 40857600 1900
48640578 zayaz777 D Jan. 20, 2019, 3:17 p.m. OK PyPy 3 TESTS 45 607 41062400 1900
48680685 agarus D Jan. 21, 2019, 1:10 p.m. OK PyPy 3 TESTS 45 639 57958400 1900
48643288 Kelang D Jan. 20, 2019, 4:12 p.m. OK PyPy 3 TESTS 45 701 100044800 1900
48926099 nik-in-au D Jan. 25, 2019, 10:32 a.m. OK PyPy 3 TESTS 46 780 122982400 1900
48689980 pajenegod D Jan. 21, 2019, 5:13 p.m. OK Python 2 TESTS 45 1669 76492800 1900
48765142 pajenegod D Jan. 22, 2019, 6:59 p.m. OK Python 2 TESTS 46 1684 77721600 1900
48689905 pajenegod D Jan. 21, 2019, 5:10 p.m. OK Python 2 TESTS 45 1747 78028800 1900
48687040 pajenegod D Jan. 21, 2019, 3:47 p.m. OK Python 2 TESTS 45 1778 49971200 1900
48687314 pajenegod D Jan. 21, 2019, 3:54 p.m. OK Python 2 TESTS 45 1809 50995200 1900
48687945 pajenegod D Jan. 21, 2019, 4:11 p.m. OK Python 2 TESTS 45 1824 50995200 1900
48688280 pajenegod D Jan. 21, 2019, 4:20 p.m. OK Python 2 TESTS 45 1855 77721600 1900
48689541 pajenegod D Jan. 21, 2019, 4:56 p.m. OK Python 2 TESTS 45 1886 78745600 1900
48765268 pajenegod D Jan. 22, 2019, 7:02 p.m. OK Python 2 TESTS 46 1887 78848000 1900
48686727 pajenegod D Jan. 21, 2019, 3:39 p.m. OK Python 2 TESTS 45 1965 49971200 1900
51681157 huangbinapple D March 22, 2019, 12:44 p.m. OK Python 3 TESTS 46 1824 65024000 1900
51681480 huangbinapple D March 22, 2019, 12:51 p.m. OK Python 3 TESTS 46 1840 65843200 1900
48631042 yakamoto D Jan. 20, 2019, 1:28 p.m. OK Scala TESTS 45 1076 44032000 1900

remove filters

Back to search problems