Codeforces Round 864 (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
1797 Codeforces Round 864 (Div. 2) FINISHED False 7200 50860499 April 8, 2023, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 17587 ) A Li Hua and Maze PROGRAMMING constructive algorithms greedy

B"There is a rectangular maze of size n x m . Denote (r,c) as the cell on the r -th row from the top and the c -th column from the left. Two cells are adjacent if they share an edge. A path is a sequence of adjacent empty cells. Each cell is initially empty. Li Hua can choose some cells (except (x_1, y_1) and (x_2, y_2) ) and place an obstacle in each of them. He wants to know the minimum number of obstacles needed to be placed so that there isn't a path from (x_1, y_1) to (x_2, y_2) . Suppose you were Li Hua, please solve this problem. The first line contains the single integer t ( 1 <= t <= 500 ) -- the number of test cases. The first line of each test case contains two integers n,m ( 4 <= n,m <= 10^9 ) -- the size of the maze. The second line of each test case contains four integers x_1,y_1,x_2,y_2 ( 1 <= x_1,x_2 <= n, 1 <= y_1,y_2 <= m ) -- the coordinates of the start and the end. It is guaranteed that |x_1-x_2|+|y_1-y_2| ge 2 . For each test case print the minimum number of obstacles you need to put on the field so that there is no path from (x_1, y_1) to (x_2, y_2) . In test case 1, you can put obstacles on (1,3), (2,3), (3,2), (4,2) . Then the path from (2,2) to (3,3) will not exist. "...

Tutorials

Codeforces Round 864 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
201356491 anupam A April 8, 2023, 5:08 p.m. OK C# 10 TESTS 13 46 102400
201373572 notEphim A April 8, 2023, 7:12 p.m. OK C# 10 TESTS 13 61 0
201375347 graebot A April 8, 2023, 7:25 p.m. OK C# 10 TESTS 13 62 716800
201394056 bluemegane A April 8, 2023, 10:27 p.m. OK C# 8 TESTS 13 109 819200
201355417 sachin_gupta21 A April 8, 2023, 5:01 p.m. OK Clang++20 Diagnostics TESTS 13 46 0
201413597 MaticMate A April 9, 2023, 4:12 a.m. OK GNU C11 TESTS 13 15 0
201414645 Bernoullitelsla A April 9, 2023, 4:27 a.m. OK GNU C11 TESTS 13 15 0
201421893 crazzycooder A April 9, 2023, 5:49 a.m. OK GNU C11 TESTS 13 15 0
201421995 amijeet-g A April 9, 2023, 5:50 a.m. OK GNU C11 TESTS 13 15 0
201354925 being_mysterious A April 8, 2023, 4:59 p.m. OK GNU C11 TESTS 13 15 0
201354456 Aneeba A April 8, 2023, 4:57 p.m. OK GNU C11 TESTS 13 15 0
201361890 sahmanojkumar1976 A April 8, 2023, 5:42 p.m. OK GNU C11 TESTS 13 15 0
201371131 maruf_bro A April 8, 2023, 6:54 p.m. OK GNU C11 TESTS 13 15 0
201387857 ishtiaque_736 A April 8, 2023, 9:11 p.m. OK GNU C11 TESTS 13 15 0
201413551 yamin12110103 A April 9, 2023, 4:11 a.m. OK GNU C11 TESTS 13 15 0
201402822 serggdeo A April 9, 2023, 1:22 a.m. OK GNU C++14 TESTS 13 0 0
201415046 hxzzz A April 9, 2023, 4:32 a.m. OK GNU C++14 TESTS 13 0 0
201403028 GuanineCyclonus A April 9, 2023, 1:26 a.m. OK GNU C++14 TESTS 13 0 0
201402615 YSY20091 A April 9, 2023, 1:18 a.m. OK GNU C++14 TESTS 13 0 0
201402342 _wh A April 9, 2023, 1:14 a.m. OK GNU C++14 TESTS 13 0 0
201401275 ptraffic1919810 A April 9, 2023, 12:52 a.m. OK GNU C++14 TESTS 13 0 0
201395872 Zena_Hossam A April 8, 2023, 11 p.m. OK GNU C++14 TESTS 13 0 0
201381574 alter_mind A April 8, 2023, 8:16 p.m. OK GNU C++14 TESTS 13 0 0
201367520 somkantmishra A April 8, 2023, 6:24 p.m. OK GNU C++14 TESTS 13 0 0
201413477 Glu-TtoNy A April 9, 2023, 4:10 a.m. OK GNU C++14 TESTS 13 0 8601600
201414439 amanagarwal9738 A April 9, 2023, 4:24 a.m. OK GNU C++17 TESTS 13 0 0
201414836 Anandmishra A April 9, 2023, 4:29 a.m. OK GNU C++17 TESTS 13 0 0
201418923 guesshere A April 9, 2023, 5:19 a.m. OK GNU C++17 TESTS 13 0 0
201418978 RiverX15 A April 9, 2023, 5:20 a.m. OK GNU C++17 TESTS 13 0 0
201421270 manav_282 A April 9, 2023, 5:43 a.m. OK GNU C++17 TESTS 13 0 0
201421859 KunalSin9h A April 9, 2023, 5:48 a.m. OK GNU C++17 TESTS 13 0 0
201402846 Joanh_Lan A April 9, 2023, 1:22 a.m. OK GNU C++17 TESTS 13 0 0
201405243 henauliumou A April 9, 2023, 2:03 a.m. OK GNU C++17 TESTS 13 0 0
201411467 JellyBoi A April 9, 2023, 3:40 a.m. OK GNU C++17 TESTS 13 0 0
201408160 AmbujKul6 A April 9, 2023, 2:49 a.m. OK GNU C++17 TESTS 13 0 0
201360280 ThunderXGod A April 8, 2023, 5:31 p.m. OK GNU C++17 (64) TESTS 13 0 0
201356176 you_knowme A April 8, 2023, 5:06 p.m. OK GNU C++17 (64) TESTS 13 0 0
201420621 axbbys A April 9, 2023, 5:37 a.m. OK GNU C++17 (64) TESTS 13 0 0
201419134 _oo1oo_ A April 9, 2023, 5:21 a.m. OK GNU C++17 (64) TESTS 13 0 0
201405181 vegetable_zajasi A April 9, 2023, 2:02 a.m. OK GNU C++17 (64) TESTS 13 0 0
201403321 Njaso A April 9, 2023, 1:31 a.m. OK GNU C++17 (64) TESTS 13 0 0
201402257 panyi A April 9, 2023, 1:12 a.m. OK GNU C++17 (64) TESTS 13 0 0
201396942 Rania A April 8, 2023, 11:20 p.m. OK GNU C++17 (64) TESTS 13 0 0
201381533 noobzero A April 8, 2023, 8:16 p.m. OK GNU C++17 (64) TESTS 13 0 0
201381141 kevinyang A April 8, 2023, 8:12 p.m. OK GNU C++17 (64) TESTS 13 0 0
201415752 amaN07 A April 9, 2023, 4:43 a.m. OK GNU C++20 (64) TESTS 13 0 0
201421632 srujanwadkar13 A April 9, 2023, 5:46 a.m. OK GNU C++20 (64) TESTS 13 0 0
201420954 Pupil-Master A April 9, 2023, 5:40 a.m. OK GNU C++20 (64) TESTS 13 0 0
201419609 pratham534 A April 9, 2023, 5:27 a.m. OK GNU C++20 (64) TESTS 13 0 0
201419200 maniac01 A April 9, 2023, 5:22 a.m. OK GNU C++20 (64) TESTS 13 0 0
201418329 huyminh A April 9, 2023, 5:13 a.m. OK GNU C++20 (64) TESTS 13 0 0
201417582 Glydon A April 9, 2023, 5:05 a.m. OK GNU C++20 (64) TESTS 13 0 0
201417458 bnu20DT A April 9, 2023, 5:04 a.m. OK GNU C++20 (64) TESTS 13 0 0
201416685 aibark A April 9, 2023, 4:55 a.m. OK GNU C++20 (64) TESTS 13 0 0
201415431 Esraa_mabrouk A April 9, 2023, 4:38 a.m. OK GNU C++20 (64) TESTS 13 0 0
201354302 davi0015 A April 8, 2023, 4:56 p.m. OK Go TESTS 13 30 102400
201371148 cpcdevar A April 8, 2023, 6:54 p.m. OK Java 11 TESTS 13 155 0
201379523 Ahmed_Amine A April 8, 2023, 7:59 p.m. OK Java 11 TESTS 13 171 0
201370485 Pranav_Sharda A April 8, 2023, 6:48 p.m. OK Java 11 TESTS 13 171 0
201363690 BabyBlue0514 A April 8, 2023, 5:54 p.m. OK Java 11 TESTS 13 171 0
201369426 codingIsFun1234 A April 8, 2023, 6:40 p.m. OK Java 11 TESTS 13 187 0
201353943 abdalla20068440 A April 8, 2023, 4:54 p.m. OK Java 11 TESTS 13 202 0
201413288 _snn A April 9, 2023, 4:07 a.m. OK Java 11 TESTS 13 217 0
201381331 ilasiawo A April 8, 2023, 8:14 p.m. OK Java 11 TESTS 13 217 0
201418066 enuguru_2002 A April 9, 2023, 5:10 a.m. OK Java 11 TESTS 13 217 5836800
201421647 manish26eleven A April 9, 2023, 5:46 a.m. OK Java 11 TESTS 13 218 0
201364344 TCchen A April 8, 2023, 5:59 p.m. OK Java 17 TESTS 13 155 102400
201373856 frzcodes12 A April 8, 2023, 7:14 p.m. OK Java 17 TESTS 13 170 512000
201392510 kcarnrite A April 8, 2023, 10:03 p.m. OK Java 17 TESTS 13 171 512000
201361330 aishwarykesarwani A April 8, 2023, 5:38 p.m. OK Java 17 TESTS 13 186 409600
201415099 lpk15014 A April 9, 2023, 4:33 a.m. OK Java 17 TESTS 13 187 512000
201355928 Try14022001Baar A April 8, 2023, 5:05 p.m. OK Java 17 TESTS 13 187 614400
201419965 dhruv.p6 A April 9, 2023, 5:30 a.m. OK Java 17 TESTS 13 202 204800
201359101 swatishivam23 A April 8, 2023, 5:23 p.m. OK Java 17 TESTS 13 202 512000
201405443 sanath.r A April 9, 2023, 2:06 a.m. OK Java 17 TESTS 13 218 819200
201419885 dhruv.p6 A April 9, 2023, 5:29 a.m. OK Java 17 TESTS 13 233 102400
201404777 Blue_BEE A April 9, 2023, 1:56 a.m. OK Java 8 TESTS 13 93 0
201392007 Hinnawi24 A April 8, 2023, 9:57 p.m. OK Java 8 TESTS 13 93 0
201362573 FlameFire A April 8, 2023, 5:46 p.m. OK Java 8 TESTS 13 93 0
201365951 Parth_Pandey A April 8, 2023, 6:11 p.m. OK Java 8 TESTS 13 108 0
201356279 QUITTING A April 8, 2023, 5:06 p.m. OK Java 8 TESTS 13 108 0
201355302 QUITTING A April 8, 2023, 5:01 p.m. OK Java 8 TESTS 13 109 0
201376505 toufique_husein A April 8, 2023, 7:34 p.m. OK Java 8 TESTS 13 124 0
201364432 juhaied.hossen A April 8, 2023, 5:59 p.m. OK Java 8 TESTS 13 139 0
201382758 nishikar A April 8, 2023, 8:27 p.m. OK Java 8 TESTS 13 140 0
201372366 mari_kadi A April 8, 2023, 7:04 p.m. OK Java 8 TESTS 13 140 0
201357505 Krantzy A April 8, 2023, 5:14 p.m. OK Kotlin 1.7 TESTS 13 280 0
201404795 ishybee A April 9, 2023, 1:56 a.m. OK MS C++ 2017 TESTS 13 15 0
201394683 shorya1835 A April 8, 2023, 10:38 p.m. OK MS C++ 2017 TESTS 13 15 0
201355948 shashank4628 A April 8, 2023, 5:05 p.m. OK MS C++ 2017 TESTS 13 15 0
201403626 cz1137 A April 9, 2023, 1:36 a.m. OK MS C++ 2017 TESTS 13 30 0
201368588 harsh._k A April 8, 2023, 6:33 p.m. OK MS C++ 2017 TESTS 13 31 0
201397096 sochocaml A April 8, 2023, 11:23 p.m. OK Ocaml TESTS 13 0 0
201396802 sochocaml A April 8, 2023, 11:18 p.m. OK Ocaml TESTS 13 15 0
201357764 jvatsal0709 A April 8, 2023, 5:15 p.m. OK PyPy 3 TESTS 13 92 1638400
201411446 oooommmm A April 9, 2023, 3:40 a.m. OK PyPy 3 TESTS 13 124 2048000
201361953 Febrin A April 8, 2023, 5:42 p.m. OK PyPy 3 TESTS 13 124 2150400
201361188 Omega_3 A April 8, 2023, 5:37 p.m. OK PyPy 3 TESTS 13 139 2150400
201386900 simonnarang A April 8, 2023, 9:02 p.m. OK PyPy 3 TESTS 13 140 2048000
201362817 rajeshpenugonda A April 8, 2023, 5:48 p.m. OK PyPy 3 TESTS 13 156 7168000
201364805 brokie A April 8, 2023, 6:02 p.m. OK PyPy 3 TESTS 13 202 4915200
201411060 bot_on99 A April 9, 2023, 3:34 a.m. OK PyPy 3-64 TESTS 13 61 0
201390782 oneku16 A April 8, 2023, 9:42 p.m. OK PyPy 3-64 TESTS 13 62 0
201361675 ablakew7ab A April 8, 2023, 5:40 p.m. OK PyPy 3-64 TESTS 13 62 0
201359440 _icy_ A April 8, 2023, 5:26 p.m. OK PyPy 3-64 TESTS 13 62 0
201359328 single_braincell A April 8, 2023, 5:25 p.m. OK PyPy 3-64 TESTS 13 62 0
201358992 cholebhature A April 8, 2023, 5:23 p.m. OK PyPy 3-64 TESTS 13 62 102400
201360861 gardengnome A April 8, 2023, 5:35 p.m. OK PyPy 3-64 TESTS 13 62 1638400
201383895 cybsbbb A April 8, 2023, 8:37 p.m. OK PyPy 3-64 TESTS 13 62 1740800
201355093 sixthcore A April 8, 2023, 5 p.m. OK PyPy 3-64 TESTS 13 62 13824000
201410091 Youarenotgood A April 9, 2023, 3:19 a.m. OK PyPy 3-64 TESTS 13 77 0
201423283 Prasanth_22 A April 9, 2023, 6:02 a.m. OK Python 3 TESTS 13 46 0
201420464 Block_Cipher A April 9, 2023, 5:35 a.m. OK Python 3 TESTS 13 46 0
201419788 foselpis A April 9, 2023, 5:28 a.m. OK Python 3 TESTS 13 46 0
201415945 Komali0214 A April 9, 2023, 4:45 a.m. OK Python 3 TESTS 13 46 0
201411146 momenelmesady4803 A April 9, 2023, 3:35 a.m. OK Python 3 TESTS 13 46 0
201410587 AM030502 A April 9, 2023, 3:27 a.m. OK Python 3 TESTS 13 46 0
201407167 abishek0suresh A April 9, 2023, 2:34 a.m. OK Python 3 TESTS 13 46 0
201399242 eugalt A April 9, 2023, 12:09 a.m. OK Python 3 TESTS 13 46 0
201383948 Dert30 A April 8, 2023, 8:38 p.m. OK Python 3 TESTS 13 46 0
201375236 jainsaiyam2004 A April 8, 2023, 7:24 p.m. OK Python 3 TESTS 13 46 0
201408545 avnyu A April 9, 2023, 2:55 a.m. OK Rust 2021 TESTS 13 15 0
201384021 liut A April 8, 2023, 8:38 p.m. OK Rust 2021 TESTS 13 15 0
201399114 ilyshana A April 9, 2023, 12:06 a.m. OK Rust 2021 TESTS 13 31 0

remove filters

Back to search problems