链接:登录—专业IT笔试面试备考平台_牛客网
来源:牛客网
题目描述
There is an n×mn\times mn×m mirror maze, where there is a mirror on each grid. The mirrors are in one of the following four types:
- ``-'', the light from above or below will be reflected back, the light from left or right will continue going forward without being reflected, respectively;
- ``|'', the light from left or right will be reflected back, the light from above or below will continue going forward without being reflected, respectively;
- ``/'', the light from left, right, above, below will be reflected to go above, below, left, right, respectively;
- ``\\backslash\'', the light from left, right, above, below will be reflected to go below, above, right, left, respectively.
Now there are qqq light sources. Little G, the believer of the light, wants t

最低0.47元/天 解锁文章





