Radio Direction Finding
题目描述
This is an interactive problem.
Radio direction finding, also known as radio orienteering or radio fox hunting, is a sport that combines radio technology with outdoor navigation. Participants use specialized receivers to locate hidden radio transmitters, testing their sense of direction and radio operation skills.
A university offers a PE course in radio direction finding. During the final exam, the teacher takes the students to a local tourist attraction. The map of the attraction can be considered as a cycle of n n n points ( n n n is an odd number), numbered clockwise as 1 , 2 , … , n 1,2,\ldots,n 1,2,…,n. The teacher has previously buried two transmitters at two different points and given you a radio receiver.
This receiver is special; each time it receives a signal, you need to manually press a button on the receiver, and then the receiver will tell you the sum of the shortest distances from these two transmitters to your current location (distance is defined as the number of edges traversed). The passing criterion for the final exam is to find the positions of these two transmitters using the receiver no more than 40 40 40 times.
Now, please write an interactive program to successfully pass the final exam.
交互
First, read a positive integer T T T ( 1 ≤ T ≤ 1 0 3 1 \le T \le 10^3 1≤T≤103) from the standard input, indicating the number of test cases.
For each test case, first read a positive integer n n n ( 3 ≤ n ≤ 1 0 9 3 \le n \le 10^9 3≤n≤10


234

被折叠的 条评论
为什么被折叠?



