| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 (추가 시간 없음) | 1024 MB | 157 | 41 | 37 | 41.111% |
You need to lay a cable to connect two computers with each other. This cable however has a very specific length and you need to use exactly the full length of the cable. Moreover, the cable cannot intersect itself and one part of the cable cannot be too close to another part. Can you connect the two computers with each other using the full length of the cable?
The two computers are standing in an $n \times m$ rectangular two-dimensional room. Computer 1 is always positioned at $(0,0)$ (the upper left corner) and Computer 2 at $(n,m)$ (the lower right corner). The cable is specified by a sequence of marked points $p_1, p_2, \dots, p_s$. The path of the cable is then obtained by connecting the consecutive points of this sequence with (straight) line segments. The cable path should satisfy the following constraints:
The input consists of:
Output the number of points $k$ (2ドル \le k \le 500$) that the cable path contains, followed by the $k$ points of the path, in their respective order. Each point consists of two floating-point numbers $x$ and $y$ $(0 \le x, y \le 100),ドル the $x$- and $y$-coordinates of this point in the path.
The total length of the path should be exactly $\ell,ドル up to a relative or absolute error of 10ドル^{-6}$.
If there are multiple valid solutions, you may output any one of them.
3 4 5.0
2 0 0 3 4
3 4 7.0
3 0 0 3 0 3 4
5 5 11.5
7 0 0 2 0 2 1.75 4 1.75 4 1 5 1 5 5
ICPC > Regionals > Europe > Northwestern European Regional Contest > Benelux Algorithm Programming Contest > BAPC 2021 K번
Camp > Petrozavodsk Programming Camp > Winter 2022 > Day 4: NCPC+BAPC+CTU 2021 Selection K번
ICPC > Regionals > Europe > Northwestern European Regional Contest > The UK & Ireland Programming Contest > UKIEPC 2021 K번