当前位置:网站首页>[detailed explanation of Huawei machine test] happy weekend

[detailed explanation of Huawei machine test] happy weekend

2022-07-05 14:34:00 A less intelligent programmer


Preface

《 Huawei machine test real problem 》 The column includes Huawei column of niuke.com 、 Huawei test questions 、 Huawei OD Real problem of machine test .

If you are preparing for Huawei's interview , If you want to know something, you can send me a private letter , I will try my best to help you , I can also give you some suggestions !

This paper solves the non optimal solution ( Non optimal performance ).

Title Description

Xiaohua and Xiaowei are very good friends , They agreed to have dinner together on weekends and communicate through mobile phones , They chose several places for dinner on the map ( Due to natural terrain and other reasons , Some dining places are inaccessible ), How many dining places can Xiaohua and Xiaowei reach ?

Input description :
First line input m and n,m Represents the length of the map ,n Represents the width of the map .
The second line starts to input the map information , The map information contains :
0 For a smooth road
1 For obstacles ( Dan only 1 For obstacles )
2 For Xiaohua or Xiaowei , There must be and only 2 individual ( No obstacles )
3 For the selected gathering place ( No obstacles )

Special reminder !!!!
Be careful 1: Machine test AC

原网站

版权声明
本文为[A less intelligent programmer]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/186/202207051433526672.html