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.
Problems
The Professor has lost his home robot yet again. After some thinking Professor understood that he had left the robot in the basement. The basement in Professor's house is represented by a rectangle n × m , split into 1 × 1 squares. Some squares are walls which are impassable; other squares are passable. You can get from any passable square to any other passable square moving through edge-adjacent passable squares. One passable square is the exit from the basement. The robot is placed exactly in one passable square. Also the robot may be placed in the exit square. Professor is scared of going to the dark basement looking for the robot at night. However, he has a basement plan and the robot's remote control. Using the remote, Professor can send signals to the robot to shift one square left, right, up or down. When the robot receives a signal, it moves in the required direction if the robot's neighboring square in the given direction is passable. Otherwise, the robot stays idle. Professor wrote a sequence of k commands on a piece of paper. He thinks that the sequence can lead the robot out of the basement, wherever it's initial position might be. Professor programmed another robot to press the required buttons on the remote according to the notes on the piece of paper. Professor was just about to run the program and go to bed, when he had an epiphany. Executing each command takes some energy and Professor doesn't want to get huge electricity bill at the end of the month. That's why he wants to find in the sequence he has written out the minimal possible prefix that would guarantee to lead the robot out to the exit after the prefix is fulfilled. And that's the problem Professor challenges you with at this late hour. The first line contains three integers n , m and k ( 3 ≤ n , m ≤ 150 , 1 ≤ k ≤ 10 5 ). Next n lines contain m characters each — that is the Professor's basement's description: " # " stands for a wall, " . " stands for a passable square and " E " st |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|
547799 |
tourist |
D |
July 15, 2011, 5:51 p.m. |
OK |
Delphi |
TESTS |
72 |
2670 |
2764800 |
|
2600 |
|
672885 |
Sereja |
D |
Sept. 7, 2011, 7:52 p.m. |
OK |
FPC |
TESTS |
72 |
1750 |
1024000 |
|
2600 |
|
1386070 |
sillycross |
D |
March 22, 2012, 5 a.m. |
OK |
FPC |
TESTS |
72 |
2220 |
1024000 |
|
2600 |
|
550235 |
ACRush |
D |
July 18, 2011, 11:19 a.m. |
OK |
GNU C++ |
TESTS |
72 |
330 |
1536000 |
|
2600 |
|
11412812 |
vjudge4 |
D |
June 4, 2015, 11:36 a.m. |
OK |
GNU C++ |
TESTS |
72 |
342 |
102400 |
|
2600 |
|
11412780 |
vjudge4 |
D |
June 4, 2015, 11:33 a.m. |
OK |
GNU C++ |
TESTS |
72 |
372 |
204800 |
|
2600 |
|
546973 |
Gassa |
D |
July 15, 2011, 1:05 p.m. |
OK |
GNU C++ |
TESTS |
72 |
410 |
1536000 |
|
2600 |
|
546992 |
Zhukov_Dmitry |
D |
July 15, 2011, 1:07 p.m. |
OK |
GNU C++ |
TESTS |
72 |
420 |
1740800 |
|
2600 |
|
8876218 |
wmdcstdio |
D |
Nov. 28, 2014, 6:53 a.m. |
OK |
GNU C++ |
TESTS |
72 |
560 |
102400 |
|
2600 |
|
614593 |
imbanoob |
D |
Aug. 18, 2011, 6:05 p.m. |
OK |
GNU C++ |
TESTS |
72 |
560 |
1638400 |
|
2600 |
|
552495 |
knightL |
D |
July 20, 2011, 4:02 p.m. |
OK |
GNU C++ |
TESTS |
72 |
590 |
1638400 |
|
2600 |
|
8876228 |
wmdcstdio |
D |
Nov. 28, 2014, 6:53 a.m. |
OK |
GNU C++ |
TESTS |
72 |
592 |
102400 |
|
2600 |
|
3465653 |
vjudge3 |
D |
April 2, 2013, 7:40 p.m. |
OK |
GNU C++ |
TESTS |
72 |
593 |
102400 |
|
2600 |
|
7515233 |
a654889339 |
D |
Aug. 20, 2014, 10:39 a.m. |
OK |
GNU C++0x |
TESTS |
72 |
748 |
102400 |
|
2600 |
|
9815517 |
diamond_duke |
D |
Feb. 13, 2015, 11:44 a.m. |
OK |
GNU C++0x |
TESTS |
72 |
778 |
307200 |
|
2600 |
|
9817167 |
ohweonfire |
D |
Feb. 13, 2015, 2:35 p.m. |
OK |
GNU C++0x |
TESTS |
72 |
780 |
204800 |
|
2600 |
|
736766 |
cherudim |
D |
Oct. 4, 2011, 7:54 a.m. |
OK |
GNU C++0x |
TESTS |
72 |
910 |
1740800 |
|
2600 |
|
546957 |
2222 |
D |
July 15, 2011, 1:03 p.m. |
OK |
GNU C++0x |
TESTS |
72 |
1000 |
1638400 |
|
2600 |
|
9815546 |
the_silliest |
D |
Feb. 13, 2015, 11:48 a.m. |
OK |
GNU C++0x |
TESTS |
72 |
1092 |
307200 |
|
2600 |
|
9815459 |
FizzyDavid |
D |
Feb. 13, 2015, 11:37 a.m. |
OK |
GNU C++0x |
TESTS |
72 |
1152 |
307200 |
|
2600 |
|
9815421 |
FizzyDavid |
D |
Feb. 13, 2015, 11:32 a.m. |
OK |
GNU C++0x |
TESTS |
72 |
1154 |
307200 |
|
2600 |
|
61411757 |
hsfzLZH1 |
D |
Sept. 28, 2019, 8:56 a.m. |
OK |
GNU C++11 |
TESTS |
72 |
622 |
0 |
|
2600 |
|
45252908 |
KCSC |
D |
Nov. 3, 2018, 5:39 p.m. |
OK |
GNU C++11 |
TESTS |
72 |
624 |
102400 |
|
2600 |
|
61411431 |
hsfzLZH1 |
D |
Sept. 28, 2019, 8:50 a.m. |
OK |
GNU C++11 |
TESTS |
72 |
654 |
0 |
|
2600 |
|
57904747 |
lopare |
D |
July 28, 2019, 5:09 p.m. |
OK |
GNU C++11 |
TESTS |
72 |
654 |
0 |
|
2600 |
|
49180556 |
whymhe |
D |
Jan. 30, 2019, 1:15 a.m. |
OK |
GNU C++11 |
TESTS |
72 |
684 |
102400 |
|
2600 |
|
54496872 |
WOSHIGEPACHONG2 |
D |
May 22, 2019, 6:14 p.m. |
OK |
GNU C++11 |
TESTS |
72 |
686 |
102400 |
|
2600 |
|
27148935 |
fangcun |
D |
May 16, 2017, 3:09 a.m. |
OK |
GNU C++11 |
TESTS |
72 |
716 |
0 |
|
2600 |
|
34697909 |
EmanuelNrx |
D |
Jan. 30, 2018, 5:04 a.m. |
OK |
GNU C++11 |
TESTS |
72 |
716 |
2150400 |
|
2600 |
|
43791554 |
luogu_bot1 |
D |
Oct. 4, 2018, 2 p.m. |
OK |
GNU C++11 |
TESTS |
72 |
778 |
307200 |
|
2600 |
|
16829912 |
freebsdx |
D |
March 20, 2016, 2:06 a.m. |
OK |
GNU C++11 |
TESTS |
72 |
778 |
2048000 |
|
2600 |
|
38584330 |
Cmise |
D |
May 24, 2018, 11:19 a.m. |
OK |
GNU C++14 |
TESTS |
72 |
530 |
204800 |
|
2600 |
|
38584298 |
Cmise |
D |
May 24, 2018, 11:18 a.m. |
OK |
GNU C++14 |
TESTS |
72 |
560 |
204800 |
|
2600 |
|
39062499 |
ugly2333 |
D |
June 9, 2018, 7:13 a.m. |
OK |
GNU C++14 |
TESTS |
72 |
560 |
307200 |
|
2600 |
|
56017380 |
sorry_im_smurfing |
D |
June 24, 2019, 10:36 p.m. |
OK |
GNU C++14 |
TESTS |
72 |
654 |
102400 |
|
2600 |
|
23671537 |
Ali.Pi |
D |
Jan. 9, 2017, 9:50 p.m. |
OK |
GNU C++14 |
TESTS |
72 |
748 |
2048000 |
|
2600 |
|
24812268 |
SoSad |
D |
Feb. 19, 2017, 11:22 p.m. |
OK |
GNU C++14 |
TESTS |
72 |
780 |
2048000 |
|
2600 |
|
40162343 |
MetaBro |
D |
July 10, 2018, 7:50 a.m. |
OK |
GNU C++14 |
TESTS |
72 |
810 |
409600 |
|
2600 |
|
56516197 |
Sonechko |
D |
July 4, 2019, 12:49 p.m. |
OK |
GNU C++14 |
TESTS |
72 |
810 |
512000 |
|
2600 |
|
58336799 |
vjudge1 |
D |
Aug. 5, 2019, 11:47 a.m. |
OK |
GNU C++14 |
TESTS |
72 |
904 |
102400 |
|
2600 |
|
25413001 |
irkstepanov |
D |
March 11, 2017, 5:02 p.m. |
OK |
GNU C++14 |
TESTS |
72 |
998 |
2457600 |
|
2600 |
|
61469363 |
MinecraftFuns |
D |
Sept. 29, 2019, 11:42 a.m. |
OK |
GNU C++17 |
TESTS |
72 |
310 |
102400 |
|
2600 |
|
63392248 |
hjk1030 |
D |
Oct. 25, 2019, 3:35 p.m. |
OK |
GNU C++17 |
TESTS |
72 |
468 |
204800 |
|
2600 |
|
56533045 |
kostia244 |
D |
July 4, 2019, 9:12 p.m. |
OK |
GNU C++17 |
TESTS |
72 |
468 |
409600 |
|
2600 |
|
40162280 |
ruo |
D |
July 10, 2018, 7:48 a.m. |
OK |
GNU C++17 |
TESTS |
72 |
780 |
409600 |
|
2600 |
|
41271009 |
Dalgerok |
D |
Aug. 6, 2018, 10:16 a.m. |
OK |
GNU C++17 |
TESTS |
72 |
1248 |
512000 |
|
2600 |
|
40077105 |
AliTavassoly |
D |
July 8, 2018, 6:22 a.m. |
OK |
GNU C++17 |
TESTS |
72 |
1434 |
614400 |
|
2600 |
|
548709 |
yaro |
D |
July 16, 2011, 3:01 p.m. |
OK |
Java 6 |
TESTS |
72 |
1220 |
43622400 |
|
2600 |
|
550682 |
Nox |
D |
July 18, 2011, 5:48 p.m. |
OK |
Java 6 |
TESTS |
72 |
1950 |
43315200 |
|
2600 |
|
548981 |
chEEtah |
D |
July 17, 2011, 12:42 a.m. |
OK |
MS C++ |
TESTS |
72 |
340 |
1536000 |
|
2600 |
|
40992529 |
ReaLNero1 |
D |
July 31, 2018, 1:23 a.m. |
OK |
MS C++ |
TESTS |
72 |
404 |
102400 |
|
2600 |
|
547457 |
e-maxx |
D |
July 15, 2011, 1:57 p.m. |
OK |
MS C++ |
TESTS |
72 |
420 |
1433600 |
|
2600 |
|
547577 |
stgatilov |
D |
July 15, 2011, 4:10 p.m. |
OK |
MS C++ |
TESTS |
72 |
530 |
2457600 |
|
2600 |
|
550611 |
Slevin |
D |
July 18, 2011, 4:20 p.m. |
OK |
MS C++ |
TESTS |
72 |
630 |
1740800 |
|
2600 |
|
550630 |
Slevin |
D |
July 18, 2011, 4:36 p.m. |
OK |
MS C++ |
TESTS |
72 |
640 |
1740800 |
|
2600 |
|
1308279 |
lllcfr |
D |
March 7, 2012, 10:26 a.m. |
OK |
MS C++ |
TESTS |
72 |
730 |
1536000 |
|
2600 |
|
549790 |
meret |
D |
July 17, 2011, 9:31 p.m. |
OK |
MS C++ |
TESTS |
72 |
840 |
1536000 |
|
2600 |
|
11354262 |
vjudge1 |
D |
May 30, 2015, 8:08 a.m. |
OK |
MS C++ |
TESTS |
72 |
966 |
204800 |
|
2600 |
|
11481298 |
vjudge5 |
D |
June 7, 2015, 3:55 a.m. |
OK |
MS C++ |
TESTS |
72 |
1060 |
204800 |
|
2600 |
remove filters
Back to search problems