Codeforces Round 829 (Div. 1)

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
1753 Codeforces Round 829 (Div. 1) FINISHED False 7200 65311799 Oct. 23, 2022, 7:50 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1780 ) D The Beach PROGRAMMING graphs shortest paths 2400

B'Andrew loves the sea. That 's why, at the height of the summer season, he decided to go to the beach, taking a sunbed with him to sunbathe. The beach is a rectangular field with n rows and m columns. Some cells of the beach are free, some have roads, stones, shops and other non-movable objects. Some of two adjacent along the side cells can have sunbeds located either horizontally or vertically. Andrew hopes to put his sunbed somewhere, but that 's a bad luck, there may no longer be free places for him! That 's why Andrew asked you to help him to find a free place for his sunbed. Andrew 's sunbed also should be places on two adjacent cells. If there are no two adjacent free cells, then in order to free some place for a sunbed, you will have to disturb other tourists. You can do the following actions: In any moment each sunbed occupies two adjacent free cells. You cannot move more than one sunbed at a time. Help Andrew to free a space for his sunbed, causing the minimum possible number of units of discomfort to other tourists, or detect that it is impossible. The first line contains two integers n and m ( 1 <= n, m <= 300 ,000 , 1 <= n cdot m <= 300 ,000 ) -- the number of rows and columns in rectangle. The second line contains two integers p and q ( 1 <= p, q <= 10^9 ) -- the number of units of discomfort caused by rotation and shift of a sunbed, respectively. Each of the following n lines contains m characters, describing cells of the rectangle. Each lines consists of characters "L", "R", "D", "U", "." and "#", denoting the type of the cell. Characters "L", "R", "D" and "U" denote a half of a sunbed placed in the cell -- left, right, bottom and top half, respectively. Character "." denotes a free cell and character "#" -- a cell, occupied by some non-movable object. Print one integer -- the minimum possible number of units of discomfort, caused to other tourists, to free a space for'...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
177721492 mban259 D Oct. 24, 2022, 5:40 a.m. OK C# 10 TESTS 63 358 51097600 2400
177592102 KumaTachiRen D Oct. 23, 2022, 9:19 a.m. OK C# 8 TESTS 63 483 17817600 2400
177595668 Gassa D Oct. 23, 2022, 9:28 a.m. OK D TESTS 63 451 38297600 2400
177599086 ZzzzRKkkkkRrrrr D Oct. 23, 2022, 9:36 a.m. OK GNU C++14 TESTS 63 109 20787200 2400
177594906 CQYZWJH D Oct. 23, 2022, 9:26 a.m. OK GNU C++14 TESTS 63 109 21811200 2400
177578503 Chinese_zjc_ D Oct. 23, 2022, 8:49 a.m. OK GNU C++14 TESTS 63 124 9011200 2400
177603396 foammm D Oct. 23, 2022, 9:47 a.m. OK GNU C++14 TESTS 63 124 20684800 2400
177591465 waaitg D Oct. 23, 2022, 9:17 a.m. OK GNU C++14 TESTS 63 124 21094400 2400
177584161 ztcakioi D Oct. 23, 2022, 9:01 a.m. OK GNU C++14 TESTS 63 124 26726400 2400
177664492 Aokana D Oct. 23, 2022, 3:18 p.m. OK GNU C++14 TESTS 63 124 46080000 2400
177706252 Ignotus0 D Oct. 24, 2022, 12:52 a.m. OK GNU C++14 TESTS 63 124 99840000 2400
177714815 ykl D Oct. 24, 2022, 3:44 a.m. OK GNU C++14 TESTS 63 140 15052800 2400
177671998 omeganot D Oct. 23, 2022, 4:20 p.m. OK GNU C++14 TESTS 63 140 15769600 2400
177587758 blackyuki D Oct. 23, 2022, 9:09 a.m. OK GNU C++17 TESTS 63 93 26726400 2400
177603107 Kaibad D Oct. 23, 2022, 9:46 a.m. OK GNU C++17 TESTS 63 93 33484800 2400
177647544 AlexanderL D Oct. 23, 2022, 1:14 p.m. OK GNU C++17 TESTS 63 124 15769600 2400
177599761 HuaJun D Oct. 23, 2022, 9:38 a.m. OK GNU C++17 TESTS 63 124 21606400 2400
177596515 fallleaves07 D Oct. 23, 2022, 9:30 a.m. OK GNU C++17 TESTS 63 124 21811200 2400
177582392 mango_lassi D Oct. 23, 2022, 8:57 a.m. OK GNU C++17 TESTS 63 124 25395200 2400
177592570 HoshimiOWO D Oct. 23, 2022, 9:20 a.m. OK GNU C++17 TESTS 63 124 40857600 2400
177599051 Puranya_ D Oct. 23, 2022, 9:36 a.m. OK GNU C++17 TESTS 63 140 15872000 2400
177596705 realcomplex D Oct. 23, 2022, 9:30 a.m. OK GNU C++17 TESTS 63 140 32768000 2400
177646612 zhangguangxuan99 D Oct. 23, 2022, 1:04 p.m. OK GNU C++17 TESTS 63 155 16486400 2400
177576143 natsugiri D Oct. 23, 2022, 8:45 a.m. OK GNU C++17 (64) TESTS 63 78 27648000 2400
177589007 PetelgeuseRomaneeconti D Oct. 23, 2022, 9:12 a.m. OK GNU C++17 (64) TESTS 63 93 10137600 2400
177711573 cuiaoxiang D Oct. 24, 2022, 2:48 a.m. OK GNU C++17 (64) TESTS 63 93 12288000 2400
177696212 user202729_ D Oct. 23, 2022, 8:26 p.m. OK GNU C++17 (64) TESTS 63 93 21708800 2400
177573602 potato167 D Oct. 23, 2022, 8:40 a.m. OK GNU C++17 (64) TESTS 63 93 24166400 2400
177588783 Emilan D Oct. 23, 2022, 9:11 a.m. OK GNU C++17 (64) TESTS 63 93 28979200 2400
177701281 enslaved D Oct. 23, 2022, 10:13 p.m. OK GNU C++17 (64) TESTS 63 93 38604800 2400
177603615 Tgiwx D Oct. 23, 2022, 9:47 a.m. OK GNU C++17 (64) TESTS 63 93 44236800 2400
177599638 SW2000 D Oct. 23, 2022, 9:38 a.m. OK GNU C++17 (64) TESTS 63 108 21708800 2400
177703792 siganai D Oct. 23, 2022, 11:36 p.m. OK GNU C++17 (64) TESTS 63 109 21708800 2400
177563465 jiangly D Oct. 23, 2022, 8:24 a.m. OK GNU C++20 (64) TESTS 63 46 15667200 2400
177646642 lemelisk D Oct. 23, 2022, 1:05 p.m. OK GNU C++20 (64) TESTS 63 62 33792000 2400
177580081 flukehn D Oct. 23, 2022, 8:52 a.m. OK GNU C++20 (64) TESTS 63 77 21708800 2400
177570973 ko_osaga D Oct. 23, 2022, 8:36 a.m. OK GNU C++20 (64) TESTS 63 77 21708800 2400
177577373 Chenyu_Qiu D Oct. 23, 2022, 8:47 a.m. OK GNU C++20 (64) TESTS 63 78 19763200 2400
177702947 smax D Oct. 23, 2022, 11:06 p.m. OK GNU C++20 (64) TESTS 63 78 21708800 2400
177588848 Alice114514 D Oct. 23, 2022, 9:11 a.m. OK GNU C++20 (64) TESTS 63 78 21708800 2400
177594508 ytkn D Oct. 23, 2022, 9:25 a.m. OK GNU C++20 (64) TESTS 63 93 21708800 2400
177594120 VLamarca D Oct. 23, 2022, 9:24 a.m. OK GNU C++20 (64) TESTS 63 93 24166400 2400
177656334 physics0523 D Oct. 23, 2022, 2:14 p.m. OK GNU C++20 (64) TESTS 63 93 33792000 2400
177604949 fetetriste D Oct. 23, 2022, 9:49 a.m. OK Java 8 TESTS 63 343 12800000 2400
177695333 arvindf232 D Oct. 23, 2022, 8:12 p.m. OK Kotlin 1.6 TESTS 63 374 51097600 2400
177695548 arvindf232 D Oct. 23, 2022, 8:15 p.m. OK Kotlin 1.6 TESTS 63 389 51097600 2400
177695517 arvindf232 D Oct. 23, 2022, 8:14 p.m. OK Kotlin 1.6 TESTS 63 389 51097600 2400
177575175 EduRoundOnly D Oct. 23, 2022, 8:43 a.m. OK Kotlin 1.6 TESTS 63 436 49664000 2400
177646764 r57shell D Oct. 23, 2022, 1:06 p.m. OK MS C++ 2017 TESTS 63 109 10854400 2400
177604608 taekop D Oct. 23, 2022, 9:49 a.m. OK MS C++ 2017 TESTS 63 218 16896000 2400
177651901 r57shell D Oct. 23, 2022, 1:45 p.m. OK PyPy 3-64 TESTS 63 810 56627200 2400
177597247 kyoran D Oct. 23, 2022, 9:32 a.m. OK PyPy 3-64 TESTS 63 842 34201600 2400
177712543 toam D Oct. 24, 2022, 3:05 a.m. OK PyPy 3-64 TESTS 63 950 94105600 2400
177572841 conqueror_of_tourist D Oct. 23, 2022, 8:39 a.m. OK PyPy 3-64 TESTS 63 998 104243200 2400
177586706 katand D Oct. 23, 2022, 9:06 a.m. OK Rust 2021 TESTS 63 93 29081600 2400
177692902 titia D Oct. 23, 2022, 7:34 p.m. OK Rust 2021 TESTS 63 109 19251200 2400
177568178 sansen D Oct. 23, 2022, 8:31 a.m. OK Rust 2021 TESTS 63 171 25190400 2400
177599724 sufficiently_large_boss D Oct. 23, 2022, 9:38 a.m. OK Rust 2021 TESTS 63 249 31334400 2400

remove filters

Back to search problems