正方形跑道
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
正方形跑道
题目描述
平面直角坐标系中有一个正方形,其四个顶点坐标分别是,正方形的边上有两个点。现在要把沿着正方形的四条边移到,问最少的移动距离。
输入格式
输入第一行一个整数表示正方形边长,第二行两个整数表示点位置,第三行两个整数表示点位置。
输出格式
输出一个整数表示最小移动距离。
样例 #1
样例输入 #1
3
0 0
2 3
样例输出 #1
5
提示
样例解释1
路线是。
数据范围
对的数据,
对的数据,,保证点和点都在正方形的边上。
初一3非竞赛组期中考
- Status
- Done
- Rule
- OI
- Problem
- 8
- Start at
- 2023-11-13 14:30
- End at
- 2023-11-13 16:00
- Duration
- 1.5 hour(s)
- Host
- Partic.
- 30