Huawei OD Machine Test Questions - Signal Transmission and Reception [2023Q2] [JAVA, Python, C++]

Title description:

    There is a two-dimensional antenna matrix. Each antenna can transmit signals to other antennas and receive signals from other antennas. For the sake of simplicity, we agree that each antenna can only transmit signals to the east and south. In other words, each antenna can only transmit signals to the east and south. Can receive signals sent east or south.

    Each antenna has its own height anth, the height of each antenna is stored in a two-dimensional array, the position of each antenna is represented by [r, c], r represents the row position of the antenna (numbered from 0), and c represents the antenna The column position (numbered from 0)

    In a certain direction (east or south), a certain antenna can receive signals from multiple other antennas (and may not receive signals from any other antenna), and for any antenna X and antenna Y, antenna X can receive The conditions for the signal to antenna Y are: (1) antenna X is to the east or south of antenna Y; (2) the height of other antennas between antenna X and antenna Y is lower than antenna X and antenna Y, or antenna X and antenna Y There are no other antennas between the antennas Y, that is, no occlusion.

    On row 0 of the antenna matrix, antenna [0, 0] cannot receive signals from any other antenna, antenna [0, 1] can receive signals from antenna [0, 0], and antenna [0, 2] can receive The signal to the antenna [0, 1], the antenna [0, 3] can receive the signal of the antenna [0, 1] and the antenna [0, 2], and the antenna [0, 4] can receive the signal of the antenna [0, 3] The signal of the antenna [0, 5] can receive the signal of the antenna [0, 4]; on the 0th column of the antenna matrix, the antenna [0, 0] cannot receive the signal of any other antenna, the antenna [1, 0 ] can receive the signal of antenna [0, 0], antenna [2, 0] can receive the signal of antenna [1, 0], antenna [3, 0] can receive the signal of antenna [1, 0] and antenna [2 , 0], the antenna [4, 0] can receive the signal of the antenna [3, 0] ÿ

Supongo que te gusta

Origin blog.csdn.net/2301_76848549/article/details/130174811
Recomendado
Clasificación