A1172 | [COCI-2008_2009-contest6]#1 BAZEN
来源COCI
时间限制1s
内存限制128MB
通过 / 提交0/0
题目描述
Mirko and Slavko have built a grand new pool in front of their weekend getaway.
The pool is an isosceles right triangle, with legs of length 25
0.
Everything was perfect, girls were coming, the DJ was coming, and the parties were wild.
But, a problem arose when they started serving food at the parties. Mirko is vegetarian, while Slavko thinks a party without sausages is no party at all. Therefore they had to divide the pool into two parts.
The pool is placed into a coordinate system (as in the figure above) and divided into two parts of equal area by a line segment with both endpoints on the edges of the pool.
Write a program that, given one endpoint of the dividing line segment, calculates the coordinates of the other endpoint.
The pool is an isosceles right triangle, with legs of length 25
0.
Everything was perfect, girls were coming, the DJ was coming, and the parties were wild.
But, a problem arose when they started serving food at the parties. Mirko is vegetarian, while Slavko thinks a party without sausages is no party at all. Therefore they had to divide the pool into two parts.
The pool is placed into a coordinate system (as in the figure above) and divided into two parts of equal area by a line segment with both endpoints on the edges of the pool.
Write a program that, given one endpoint of the dividing line segment, calculates the coordinates of the other endpoint.
输入格式
The first line contains two integers, the coordinates of one endpoint of the dividing line segment.
That point will be on one of the edges of the pool.
That point will be on one of the edges of the pool.
输出格式
Output the coordinates of the other endpoint, rounded to two decimal digits.
输入输出样例
输入 #1
0 0
输出 #1
125.00 125.00
输入 #2
230 20
输出 #2
0.00 114.13
输入 #3
0 40
输出 #3
148.81 101.19
暂无题解
C++ 编辑器
输入
输出
可保存默认模板;新题优先使用已保存模板。
当前快捷键仅展示,暂不支持修改。
- 撤销
Ctrl / ⌘ + Z - 重做
Ctrl / ⌘ + Y - 查找
Ctrl / ⌘ + F - 全选
Ctrl / ⌘ + A - 复制
Ctrl / ⌘ + C - 剪切
Ctrl / ⌘ + X - 粘贴
Ctrl / ⌘ + V - 自动排版
工具栏排版按钮 - 草稿保存
编辑时自动保存到本机
历史
提交记录
状态说明时间源码
AI
作答助手
你好,我是作答助手。可以问思路、复杂度、样例含义或代码报错原因;不会直接给出完整 AC 代码。
确定要清空代码吗?
提交通过
评测结果:Accepted