P10423 [Lanqiao Cup 2024 NOI Qualifier B] Fill-in-the-Blank Problems

Description

## Task A: Handshake Problem ### Problem Description Xiao Lan organized an algorithm sharing meeting, with a total of $50$ people attending. At the meeting, everyone greeted each other by shaking hands. As usual, each person needs to shake hands with every other person except themselves exactly once. However, there are $7$ people, and these $7$ people did not shake hands with each other (but these $7$ people did shake hands with everyone except these $7$ people). How many handshakes happened in total among all the people? Note that when $A$ shakes hands with $B$, it also means $B$ shakes hands with $A$, so it counts as one handshake. ### Answer Submission This is a result fill-in-the-blank problem. You only need to compute the result and submit it. The result of this problem is an integer. When submitting the answer, only fill in this integer. Extra content will make you get no score. ## Task B: Ball Rebound ### Problem Description There is a rectangle with length $343720$ units and width $233333$ units. At the top-left vertex inside it, there is a small ball (ignore its volume). Its initial velocity is as shown in the figure and its speed stays constant. The ratio of the speed components along the length and width directions is $dx : dy = 15 : 17$. When the ball hits the border of the rectangle, it rebounds. Each rebound has equal angle of incidence and angle of reflection, so the ball changes direction and keeps the same speed (if the ball is aimed exactly at a corner, it returns along the incident direction). From the moment the ball starts to the first time it returns to the top-left vertex, what is the distance the ball travels, in units? Round the answer to two decimal places. ![](https://cdn.luogu.com.cn/upload/image_hosting/i4u1r2zv.png) ### Answer Submission This is a result fill-in-the-blank problem. You only need to compute the result and submit it. The result of this problem is a decimal number. When submitting the answer, only fill in this decimal number. Extra content will make you get no score.

Input Format

Input one uppercase letter, indicating which task it is.

Output Format

According to the input task label, output the answer of the corresponding task.

Explanation/Hint

Answer template, for reference. ```cpp #include using namespace std; int main() { string ans [] = { "The answer of task A", // Replace inside the double quotes with the answer for task A "The answer of task B", // Replace inside the double quotes with the answer for task B }; char T; cin >> T; cout