-->
当前位置:首页 > 题库

PROGRAMMING:The story of Daben (2) -- eating snacks

Luz5年前 (2021-05-10)题库330
Daben's cousin Huahua, who is the same age as Daben, finds Daben to play. Daben racks his brains to think of a game that can eat. The cousin gives a number n, which represents a square matrix of n * n (2 < = n < = 10), and gives three sets of coordinates (x1, Y1), which represents the starting point of the dash, (X2, Y2) represents the position of the flowers, (X3, Y3) represents the place for snacks. Two people compete, finish eating and go back to their starting point, it takes less time to win. Of course, Dashen and Huahua can only walk up, down, left and right, not obliquely. In addition, in order to show gentlemanly demeanor, Daben decided to let Huahua go 2 steps first. And when the two take the same amount of time, it's a win.
1 stands for the position of Big Ben.
2 is the position of the flower.
3 is the location of snacks.
###Input format:
Contains multiple test data. Each test data has multiple rows, the size of the first behavior matrix n (2 < = n < = 10), and the value of the following N behavior matrix.
###Output format:
To win a person's name, the name takes up one line. If you win, you will output Ben, and if you win, you will output Hua.
###Input example:
Here is a set of inputs. For example:
```in
two
1 2
3 0
three
2 0 0
0 0 1
0 0 3
```
###Output example:
The corresponding output is given here. For example:
```out
hua
ben
```







answer:If there is no answer, please comment