10250 - The Other Two Trees

本文介绍了一个几何问题的解决方法:已知四边形相邻正方形中两棵树的坐标,通过简单的数学计算找到其余两棵树的坐标。文章提供了一段C++代码实现,用于处理输入坐标并输出计算结果。

Problem E

The Other Two Trees

Input: standard input

Output: standard output

Time Limit: 2 seconds

 

You have a quadrilateral shaped land whose opposite fences are of equal length. You have four neighbors whose lands are exactly adjacent to your four fences, that means you have a common fence with all of them. For example if you have a fence of length d in one side, this fence of length d is also the fence of the adjacent neighbor on that side. The adjacent neighbors have no fence in common among themselves and their lands also don’t intersect. The main difference between their land and your land is that their lands are all square shaped. All your neighbors have a tree at the center of their lands. Given the Cartesian coordinates of trees of two opposite neighbors, you will have to find the Cartesian coordinates of the other two trees.

 

Input

The input file contains several lines of input. Each line contains four floating point or integer numbers x1, y1, x2, y2, where (x1, y1), (x2, y2) are the coordinates of the trees of two opposite neighbors. Input is terminated by end of file.

 

Output

For each line of input produce one line of output which contains the line “Impossible.” without the quotes, if you cannot determine the coordinates of the other two trees. Otherwise, print four floating point numbers separated by a single space with ten digits after the decimal pointax1, ay1, ax2, ay2, where (ax1, ay1)  and (ax2, ay2) are the coordinates of the other two trees. The output will be checked with special judge program, so don’t worry about the ordering of the points or small precision errors. The sample output will make it clear.

 

Sample Input

10 0 -10 0

10 0 -10 0

10 0 -10 0

 

Sample Output

0.0000000000 10.0000000000 0.0000000000 -10.0000000000

0.0000000000 10.0000000000 -0.0000000000 -10.0000000000

0.0000000000 -10.0000000000 0.0000000000 10.0000000000


一个四边形,然后以每个边向外做四个正方形。四棵树,每棵种在正方形的中心,告诉你相对的两棵的坐标,求另外两棵的坐标。

其实就是很水的几何题,自己画一下图就晓得啦。

#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int main ()
{
    double x1,y1,x2,y2,ax1,ay1,bx2,by2,a,b,x,y;
    while(cin>>x1>>y1>>x2>>y2)
    {
        if (x1==x2 && y1==y2) printf("Impossible.\n");
        else
        {
            x=(x1+x2)/2;
            y=(y1+y2)/2;
            ax1=x+(y1-y);
            bx2=x-(y1-y);
            ay1=y-(x1-x);
            by2=y+(x1-x);
            printf("%.10lf %.10lf %.10lf %.10lf\n",ax1,ay1,bx2,by2);
        }
    }
    return 0;
}


(1)求职者端(Web 前端) 岗位浏览与搜索: 智能推荐首页:基于 “专业背景 + 求职意向” 推荐匹配岗位(如 “计算机专业硕士” 优先推荐 “高校计算机教师岗”“实验员岗”),展示岗位核心信息(学校名称、岗位名称、薪资范围、截止日期)。 多条件筛选:支持按 “岗位类型(教学岗 / 科研岗 / 行政岗)、学历要求(硕士 / 博士)、地区(华北 / 华东等)、学校层次(985/211 / 双非)” 组合筛选,结果按 “匹配度 / 发布时间 / 薪资” 排序。 岗位详情页:展示 “岗位职责、任职要求、福利待遇、应聘流程、联系人信息”,提供 “收藏岗位、一键投递简历、查看该岗位竞争热度(如‘已有 230 人投递’)” 功能。 个人求职中心: 简历管理:支持创建多版本简历(如 “教学岗专用简历”“科研岗专用简历”),包含 “基本信息、教育经历、科研成果、教学经验、获奖情况” 等模块,支持 PDF 导出和在线编辑。 应聘跟踪:记录 “已投递岗位、简历状态(已接收 / 筛选中 / 面试通知 / 已录用)、截止日期提醒”,对 “3 天内即将截止的岗位” 自动推送提醒。 竞争分析:针对已投递岗位,展示 “求职者学历分布(博士占比 75%)、专业匹配度排名(你的匹配度 85 分,超过 80% 竞争者)”,辅助评估自身竞争力。 (2)高校招聘负责人端(Web 管理端) 岗位管理: 岗位发布:填写 “岗位名称、招聘人数、学历要求、专业方向、岗位职责、薪资范围、应聘方式” 等信息,支持上传 “岗位说明书附件”,设置 “自动截止日期” 和 “简历接收邮箱”。 批量操作:对 “已过期岗位” 进行批量下架,对 “热门岗位(投递量>100)” 设置 “自动置顶”,支持 “岗位信息批量导出(Excel 格式)”。 简历筛选: 智能初筛:系统自动对投递简历进行 “匹配度评分”
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值