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 |
---|---|---|---|---|---|---|
1365 | Codeforces Round 648 (Div. 2) | FINISHED | False | 8100 | 145812311 | June 7, 2020, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 17901 ) | D | Solve The Maze | PROGRAMMING | constructive algorithms dfs and similar ds graphs greedy implementation shortest paths | 1700 |
B'Vivek has encountered a problem. He has a maze that can be represented as an n x m grid. Each of the grid cells may represent the following: The only escape from the maze is at cell (n, m) . A person can move to a cell only if it shares a side with their current cell and does not contain a wall. Vivek wants to block some of the empty cells by replacing them with walls in such a way, that all the good people are able to escape, while none of the bad people are able to. A cell that initially contains 'G ' or 'B ' cannot be blocked and can be travelled through. Help him determine if there exists a way to replace some (zero or more) empty cells with walls to satisfy the above conditions. It is guaranteed that the cell (n,m) is empty. Vivek can also block this cell. The first line contains one integer t (1 <= t <= 100) -- the number of test cases. The description of the test cases follows. The first line of each test case contains two integers n , m (1 <= n, m <= 50) -- the number of rows and columns in the maze. Each of the next n lines contain m characters. They describe the layout of the maze. If a character on a line equals '. ', the corresponding cell is empty. If it equals '# ', the cell has a wall. 'G ' corresponds to a good person and 'B ' corresponds to a bad person. For each test case, print "Yes" if there exists a way to replace some empty cells with walls to satisfy the given conditions. Otherwise print "No" You may print every letter in any case (upper or lower). For the first and second test cases, all conditions are already satisfied. For the third test case, there is only one empty cell (2,2) , and if it is replaced with a wall then the good person at (1,2) will not be able to escape. For the fourth test case, the good person at (1,1) cannot escape. For the fifth test case, Vivek can block the cells (2,3) and (2,2) . For the last test case, Vivek can blo'... |
Editorial — Codeforces Round #648 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
83143296 | vjudge2 | D | June 8, 2020, 2:16 p.m. | OK | Clang++17 Diagnostics | TESTS | 49 | 264 | 614400 | 1700 | |
83146252 | SUNNY24 | D | June 8, 2020, 2:48 p.m. | OK | GNU C11 | TESTS | 49 | 31 | 204800 | 1700 | |
82890118 | JoseTomas01 | D | June 7, 2020, 9:09 p.m. | OK | GNU C11 | TESTS | 49 | 62 | 3584000 | 1700 | |
82898840 | huangxiaohua | D | June 8, 2020, 2:14 a.m. | OK | GNU C++11 | TESTS | 49 | 30 | 204800 | 1700 | |
83224816 | Byakuya_Kuchiki | D | June 9, 2020, 1:53 p.m. | OK | GNU C++11 | TESTS | 49 | 31 | 0 | 1700 | |
83205012 | mmmmyq | D | June 9, 2020, 9:32 a.m. | OK | GNU C++11 | TESTS | 49 | 31 | 0 | 1700 | |
83199237 | Anoyer | D | June 9, 2020, 8:18 a.m. | OK | GNU C++11 | TESTS | 49 | 31 | 0 | 1700 | |
83198334 | wjyu | D | June 9, 2020, 8:05 a.m. | OK | GNU C++11 | TESTS | 49 | 31 | 0 | 1700 | |
83195753 | _Nice | D | June 9, 2020, 7:29 a.m. | OK | GNU C++11 | TESTS | 49 | 31 | 0 | 1700 | |
83383971 | hxkj_99 | D | June 11, 2020, 1:21 p.m. | OK | GNU C++11 | TESTS | 49 | 31 | 0 | 1700 | |
83230139 | factoradic | D | June 9, 2020, 2:53 p.m. | OK | GNU C++11 | TESTS | 49 | 31 | 0 | 1700 | |
83229966 | factoradic | D | June 9, 2020, 2:51 p.m. | OK | GNU C++11 | TESTS | 49 | 31 | 0 | 1700 | |
83225593 | Jonathan1234 | D | June 9, 2020, 2:02 p.m. | OK | GNU C++11 | TESTS | 49 | 31 | 0 | 1700 | |
83268595 | AlphaRelease | D | June 10, 2020, 5:06 a.m. | OK | GNU C++14 | TESTS | 49 | 31 | 0 | 1700 | |
83262888 | mayiyang | D | June 10, 2020, 2:43 a.m. | OK | GNU C++14 | TESTS | 49 | 31 | 0 | 1700 | |
83209131 | worst_coder_ever | D | June 9, 2020, 10:28 a.m. | OK | GNU C++14 | TESTS | 49 | 31 | 0 | 1700 | |
83171113 | k_96 | D | June 8, 2020, 8:41 p.m. | OK | GNU C++14 | TESTS | 49 | 31 | 0 | 1700 | |
83165414 | adhirajbist | D | June 8, 2020, 6:45 p.m. | OK | GNU C++14 | TESTS | 49 | 31 | 0 | 1700 | |
83161399 | upen16 | D | June 8, 2020, 5:48 p.m. | OK | GNU C++14 | TESTS | 49 | 31 | 0 | 1700 | |
83149945 | itrwdapan | D | June 8, 2020, 3:25 p.m. | OK | GNU C++14 | TESTS | 49 | 31 | 0 | 1700 | |
83149305 | harsh_arora | D | June 8, 2020, 3:19 p.m. | OK | GNU C++14 | TESTS | 49 | 31 | 0 | 1700 | |
83286237 | Demons_Rule | D | June 10, 2020, 9:27 a.m. | OK | GNU C++14 | TESTS | 49 | 31 | 0 | 1700 | |
83377484 | isocyanide7 | D | June 11, 2020, 11:53 a.m. | OK | GNU C++14 | TESTS | 49 | 31 | 0 | 1700 | |
83270301 | xyzyzl_ | D | June 10, 2020, 5:40 a.m. | OK | GNU C++17 | TESTS | 49 | 31 | 0 | 1700 | |
83285968 | ajraj27 | D | June 10, 2020, 9:23 a.m. | OK | GNU C++17 | TESTS | 49 | 31 | 0 | 1700 | |
83222004 | Lola0213 | D | June 9, 2020, 1:19 p.m. | OK | GNU C++17 | TESTS | 49 | 31 | 0 | 1700 | |
83174694 | NurCorezzi | D | June 8, 2020, 10:51 p.m. | OK | GNU C++17 | TESTS | 49 | 31 | 0 | 1700 | |
83162349 | Chy_Chy | D | June 8, 2020, 6:01 p.m. | OK | GNU C++17 | TESTS | 49 | 31 | 0 | 1700 | |
83159573 | Candidate_noob | D | June 8, 2020, 5:24 p.m. | OK | GNU C++17 | TESTS | 49 | 31 | 0 | 1700 | |
83156081 | vepifanov | D | June 8, 2020, 4:34 p.m. | OK | GNU C++17 | TESTS | 49 | 31 | 0 | 1700 | |
83153149 | isa67719 | D | June 8, 2020, 4 p.m. | OK | GNU C++17 | TESTS | 49 | 31 | 0 | 1700 | |
83150908 | acm.iitism | D | June 8, 2020, 3:34 p.m. | OK | GNU C++17 | TESTS | 49 | 31 | 0 | 1700 | |
83142698 | ganesh_6 | D | June 8, 2020, 2:09 p.m. | OK | GNU C++17 | TESTS | 49 | 31 | 0 | 1700 | |
83136715 | nullmn | D | June 8, 2020, 12:56 p.m. | OK | GNU C++17 (64) | TESTS | 49 | 31 | 0 | 1700 | |
83132945 | sirswaginson | D | June 8, 2020, 12:10 p.m. | OK | GNU C++17 (64) | TESTS | 49 | 31 | 0 | 1700 | |
83119292 | Vivek.p | D | June 8, 2020, 9:22 a.m. | OK | GNU C++17 (64) | TESTS | 49 | 31 | 0 | 1700 | |
82901825 | CodingKnight | D | June 8, 2020, 3:22 a.m. | OK | GNU C++17 (64) | TESTS | 49 | 31 | 0 | 1700 | |
82898322 | Bediver | D | June 8, 2020, 2 a.m. | OK | GNU C++17 (64) | TESTS | 49 | 31 | 0 | 1700 | |
82895104 | sanyam1101 | D | June 8, 2020, 12:09 a.m. | OK | GNU C++17 (64) | TESTS | 49 | 31 | 0 | 1700 | |
82894249 | aryan005 | D | June 7, 2020, 11:33 p.m. | OK | GNU C++17 (64) | TESTS | 49 | 31 | 0 | 1700 | |
82893404 | CodingKnight | D | June 7, 2020, 10:55 p.m. | OK | GNU C++17 (64) | TESTS | 49 | 31 | 0 | 1700 | |
83164093 | sandy_033 | D | June 8, 2020, 6:25 p.m. | OK | GNU C++17 (64) | TESTS | 49 | 31 | 0 | 1700 | |
83164932 | inbornhandsome | D | June 8, 2020, 6:37 p.m. | OK | GNU C++17 (64) | TESTS | 49 | 31 | 0 | 1700 | |
82885334 | alex223 | D | June 7, 2020, 7:42 p.m. | OK | Go | TESTS | 49 | 46 | 307200 | 1700 | |
82885287 | alex223 | D | June 7, 2020, 7:42 p.m. | OK | Go | TESTS | 49 | 62 | 307200 | 1700 | |
82899235 | synapse | D | June 8, 2020, 2:25 a.m. | OK | Go | TESTS | 49 | 62 | 4812800 | 1700 | |
82897365 | sighduck | D | June 8, 2020, 1:31 a.m. | OK | Go | TESTS | 49 | 124 | 5529600 | 1700 | |
82890806 | bartek19121995 | D | June 7, 2020, 9:28 p.m. | OK | Go | TESTS | 49 | 842 | 12185600 | 1700 | |
83361106 | odomontois | D | June 11, 2020, 8:07 a.m. | OK | Haskell | TESTS | 49 | 202 | 1228800 | 1700 | |
83062952 | shubhampandey18 | D | June 8, 2020, 6:07 a.m. | OK | Java 11 | TESTS | 49 | 186 | 0 | 1700 | |
82905467 | zhupeijun | D | June 8, 2020, 4:28 a.m. | OK | Java 11 | TESTS | 49 | 186 | 0 | 1700 | |
83504111 | Jahanavi_28 | D | June 12, 2020, 6:39 a.m. | OK | Java 11 | TESTS | 49 | 187 | 0 | 1700 | |
83474502 | bckslsh03 | D | June 11, 2020, 6:37 p.m. | OK | Java 11 | TESTS | 49 | 187 | 0 | 1700 | |
83123810 | vickyvanshaj | D | June 8, 2020, 10:19 a.m. | OK | Java 11 | TESTS | 49 | 187 | 0 | 1700 | |
83055462 | shubhampandey18 | D | June 8, 2020, 6:05 a.m. | OK | Java 11 | TESTS | 49 | 187 | 0 | 1700 | |
82889897 | iamgabruh | D | June 7, 2020, 9:04 p.m. | OK | Java 11 | TESTS | 49 | 187 | 0 | 1700 | |
82885106 | vishesh1999gupta | D | June 7, 2020, 7:39 p.m. | OK | Java 11 | TESTS | 49 | 187 | 0 | 1700 | |
82878645 | Anonymous | D | June 7, 2020, 6:34 p.m. | OK | Java 11 | TESTS | 49 | 187 | 0 | 1700 | |
83377752 | p_unit | D | June 11, 2020, 11:56 a.m. | OK | Java 11 | TESTS | 49 | 202 | 0 | 1700 | |
83111332 | a_2410 | D | June 8, 2020, 7:44 a.m. | OK | Java 8 | TESTS | 49 | 109 | 0 | 1700 | |
83523652 | nidhigoel | D | June 12, 2020, 11:06 a.m. | OK | Java 8 | TESTS | 49 | 124 | 0 | 1700 | |
83469512 | The_Hidden_Man | D | June 11, 2020, 5:39 p.m. | OK | Java 8 | TESTS | 49 | 124 | 0 | 1700 | |
83365450 | abhinavsharma629 | D | June 11, 2020, 9:08 a.m. | OK | Java 8 | TESTS | 49 | 124 | 0 | 1700 | |
83361464 | shivamnarware | D | June 11, 2020, 8:12 a.m. | OK | Java 8 | TESTS | 49 | 124 | 0 | 1700 | |
83356622 | smkkms | D | June 11, 2020, 7:04 a.m. | OK | Java 8 | TESTS | 49 | 124 | 0 | 1700 | |
83321674 | Samez | D | June 10, 2020, 4:52 p.m. | OK | Java 8 | TESTS | 49 | 124 | 0 | 1700 | |
83219679 | ineffablekenobi | D | June 9, 2020, 12:47 p.m. | OK | Java 8 | TESTS | 49 | 124 | 0 | 1700 | |
83185662 | dhruvj94 | D | June 9, 2020, 4:55 a.m. | OK | Java 8 | TESTS | 49 | 124 | 0 | 1700 | |
83152500 | O_E | D | June 8, 2020, 3:52 p.m. | OK | Java 8 | TESTS | 49 | 124 | 0 | 1700 | |
82903594 | Spheniscine | D | June 8, 2020, 3:55 a.m. | OK | Kotlin | TESTS | 49 | 139 | 0 | 1700 | |
83172012 | shivam1420 | D | June 8, 2020, 9:04 p.m. | OK | Kotlin | TESTS | 49 | 156 | 0 | 1700 | |
83140453 | whiter4bbit | D | June 8, 2020, 1:43 p.m. | OK | Kotlin | TESTS | 49 | 217 | 204800 | 1700 | |
82886521 | vrublack | D | June 7, 2020, 7:59 p.m. | OK | Kotlin | TESTS | 49 | 374 | 1843200 | 1700 | |
83210200 | maddenvvs | D | June 9, 2020, 10:42 a.m. | OK | Mono C# | TESTS | 49 | 78 | 4812800 | 1700 | |
83302379 | TRR | D | June 10, 2020, 1:13 p.m. | OK | Mono C# | TESTS | 49 | 93 | 3276800 | 1700 | |
82877911 | fancy_lettuce | D | June 7, 2020, 6:29 p.m. | OK | Mono C# | TESTS | 49 | 108 | 7168000 | 1700 | |
83570765 | eSeF_ | D | June 13, 2020, 1:51 a.m. | OK | Mono C# | TESTS | 49 | 124 | 7270400 | 1700 | |
83226730 | olpetOdessaONU | D | June 9, 2020, 2:15 p.m. | OK | MS C++ | TESTS | 49 | 31 | 102400 | 1700 | |
83105304 | Yomapeed | D | June 8, 2020, 6:28 a.m. | OK | MS C++ 2017 | TESTS | 49 | 46 | 0 | 1700 | |
83123120 | Phil0 | D | June 8, 2020, 10:11 a.m. | OK | MS C++ 2017 | TESTS | 49 | 46 | 102400 | 1700 | |
82887762 | ilya_totl | D | June 7, 2020, 8:20 p.m. | OK | MS C++ 2017 | TESTS | 49 | 46 | 102400 | 1700 | |
83540202 | MrBear | D | June 12, 2020, 2:34 p.m. | OK | MS C++ 2017 | TESTS | 49 | 46 | 102400 | 1700 | |
83368354 | getN1ght | D | June 11, 2020, 9:48 a.m. | OK | MS C++ 2017 | TESTS | 49 | 46 | 102400 | 1700 | |
83362517 | acrux | D | June 11, 2020, 8:25 a.m. | OK | MS C++ 2017 | TESTS | 49 | 46 | 307200 | 1700 | |
83301682 | Bill_Lee | D | June 10, 2020, 1:04 p.m. | OK | MS C++ 2017 | TESTS | 49 | 46 | 307200 | 1700 | |
82883543 | ValiantMC | D | June 7, 2020, 7:19 p.m. | OK | MS C++ 2017 | TESTS | 49 | 46 | 512000 | 1700 | |
82881410 | samarth9421 | D | June 7, 2020, 6:56 p.m. | OK | MS C++ 2017 | TESTS | 49 | 46 | 716800 | 1700 | |
83254961 | Shify | D | June 9, 2020, 9:17 p.m. | OK | MS C++ 2017 | TESTS | 49 | 62 | 0 | 1700 | |
82893928 | watarimaycry2 | D | June 7, 2020, 11:19 p.m. | OK | Node.js | TESTS | 49 | 171 | 6553600 | 1700 | |
83149502 | shivam1420 | D | June 8, 2020, 3:21 p.m. | OK | Node.js | TESTS | 49 | 233 | 7372800 | 1700 | |
82884979 | Darooha | D | June 7, 2020, 7:37 p.m. | OK | Ocaml | TESTS | 49 | 46 | 614400 | 1700 | |
82887792 | realnimish | D | June 7, 2020, 8:20 p.m. | OK | PyPy 2 | TESTS | 49 | 265 | 7884800 | 1700 | |
82893643 | ycui11 | D | June 7, 2020, 11:04 p.m. | OK | PyPy 2 | TESTS | 49 | 358 | 9318400 | 1700 | |
82883680 | Ekinak | D | June 7, 2020, 7:21 p.m. | OK | PyPy 2 | TESTS | 49 | 467 | 9728000 | 1700 | |
83205058 | YouKnowNothing_JonSnow | D | June 9, 2020, 9:32 a.m. | OK | PyPy 3 | TESTS | 49 | 233 | 7372800 | 1700 | |
83210553 | mees | D | June 9, 2020, 10:46 a.m. | OK | PyPy 3 | TESTS | 49 | 265 | 8499200 | 1700 | |
82887683 | aberent | D | June 7, 2020, 8:18 p.m. | OK | PyPy 3 | TESTS | 49 | 265 | 9625600 | 1700 | |
82890828 | srkvrm | D | June 7, 2020, 9:29 p.m. | OK | PyPy 3 | TESTS | 49 | 265 | 9932800 | 1700 | |
82877873 | JEMINI | D | June 7, 2020, 6:29 p.m. | OK | PyPy 3 | TESTS | 49 | 280 | 9420800 | 1700 | |
82955395 | mon5ter | D | June 8, 2020, 5:04 a.m. | OK | PyPy 3 | TESTS | 49 | 296 | 9420800 | 1700 | |
83195005 | ngsm | D | June 9, 2020, 7:18 a.m. | OK | PyPy 3 | TESTS | 49 | 296 | 11059200 | 1700 | |
83055113 | codershuvo | D | June 8, 2020, 6:02 a.m. | OK | PyPy 3 | TESTS | 49 | 311 | 9830400 | 1700 | |
83194396 | twbbbb | D | June 9, 2020, 7:10 a.m. | OK | PyPy 3 | TESTS | 49 | 312 | 9830400 | 1700 | |
82889246 | taoboquan1 | D | June 7, 2020, 8:50 p.m. | OK | PyPy 3 | TESTS | 49 | 326 | 9728000 | 1700 | |
83122815 | hooded_sweater | D | June 8, 2020, 10:07 a.m. | OK | Python 2 | TESTS | 49 | 655 | 819200 | 1700 | |
83156565 | Yevs | D | June 8, 2020, 4:40 p.m. | OK | Python 3 | TESTS | 49 | 576 | 2252800 | 1700 | |
83237492 | chgliu | D | June 9, 2020, 4:12 p.m. | OK | Python 3 | TESTS | 49 | 623 | 716800 | 1700 | |
82903958 | Wodewarrior | D | June 8, 2020, 4:01 a.m. | OK | Python 3 | TESTS | 49 | 670 | 716800 | 1700 | |
83105965 | Rocky_311 | D | June 8, 2020, 6:36 a.m. | OK | Python 3 | TESTS | 49 | 685 | 716800 | 1700 | |
82904391 | Hiroshi.K | D | June 8, 2020, 4:09 a.m. | OK | Python 3 | TESTS | 49 | 701 | 716800 | 1700 | |
83492587 | venkat8332 | D | June 12, 2020, 3:03 a.m. | OK | Python 3 | TESTS | 49 | 717 | 409600 | 1700 | |
83105750 | sh1194 | D | June 8, 2020, 6:33 a.m. | OK | Python 3 | TESTS | 49 | 748 | 1536000 | 1700 | |
83182715 | Arpanjain.g | D | June 9, 2020, 3:45 a.m. | OK | Python 3 | TESTS | 49 | 748 | 1843200 | 1700 | |
83152638 | D_Jahnvai | D | June 8, 2020, 3:54 p.m. | OK | Python 3 | TESTS | 49 | 763 | 1536000 | 1700 | |
83295633 | nebocco | D | June 10, 2020, 11:42 a.m. | OK | Python 3 | TESTS | 49 | 764 | 409600 | 1700 | |
83175013 | kobae964 | D | June 8, 2020, 11:08 p.m. | OK | Rust | TESTS | 49 | 46 | 512000 | 1700 | |
83376879 | cotton100pc | D | June 11, 2020, 11:45 a.m. | OK | Rust | TESTS | 49 | 46 | 819200 | 1700 | |
83201274 | shion_ | D | June 9, 2020, 8:42 a.m. | OK | Rust | TESTS | 49 | 77 | 614400 | 1700 | |
82879419 | gevmart | D | June 7, 2020, 6:39 p.m. | OK | Scala | TESTS | 49 | 514 | 0 | 1700 |
Back to search problems