hiho week 150 register

Ended

Participants:305

Verdict:Wrong Answer
Score:70 / 100
Submitted:2017-05-19 02:29:44

Lang:Java

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import java.util.Arrays;
import java.util.Scanner;
/*
 https://hihocoder.com/contest/hiho150/problem/1
 1 : Demo Day
 :10000ms
 :1000ms
 :256MB
 
 You work as an intern at a robotics startup. Today is your company's demo day. 
 During the demo your company's robot will be put in a maze and without any information about the maze, 
 it should be able to find a way out.
 The maze consists of N * M grids. Each grid is either empty(represented by '.') or blocked by an obstacle(represented by 'b').
 The robot will be release at the top left corner and the exit is at the bottom right corner.
 Unfortunately some sensors on the robot go crazy just before the demo starts. 
 As a result, the robot can only repeats two operations alternatively: 
 keep moving to the right until it can't and keep moving to the bottom until it can't. 
 At the beginning, the robot keeps moving to the right.
 rrrrbb..            
 ...r....     ====> The robot route with broken sensors is marked by 'r'. 
 ...rrb..
 ...bb...
 While the FTEs(full-time employees) are busy working on the sensors, 
 you try to save the demo day by rearranging the maze in such a way that even with 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX