http://codeforces.com/problemset/problem/749/B

题意:已知平行四边形三个顶点,求另外一个顶点可能的位置。

思路:用向量来做。

 #include <cstdio>
#include <algorithm>
#include <iostream>
#include <cstring>
#include <string>
#include <cmath>
#include <queue>
#include <vector>
#include <map>
#include <set>
using namespace std;
#define INF 0x3f3f3f3f
#define N 100010
typedef long long LL;
struct node {
int x, y;
node () {}
node (int x, int y) : x(x), y(y) {}
}a[], ans[]; int main() {
for(int i = ; i < ; i++) scanf("%d%d", &a[i].x, &a[i].y);
ans[].x = a[].x + a[].x - a[].x;
ans[].y = a[].y + a[].y - a[].y;
ans[].x = a[].x - a[].x + a[].x;
ans[].y = a[].y - a[].y + a[].y;
ans[].x = a[].x + a[].x - a[].x;
ans[].y = a[].y + a[].y - a[].y;
printf("3\n");
for(int i = ; i < ; i++) printf("%d %d\n", ans[i].x, ans[i].y);
return ;
}

Codeforces 749B:Parallelogram is Back(计算几何)的更多相关文章

  1. 【codeforces 749B】Parallelogram is Back

    time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard ou ...

  2. Codeforces 659D Bicycle Race【计算几何】

    题目链接: http://codeforces.com/contest/659/problem/D 题意: 若干条直线围城的湖,给定直线的端点,判断多少个转点会有危险?(危险是指直走的的话会掉进水里) ...

  3. Codeforces 340B - Maximal Area Quadrilateral (计算几何)

    Codeforces Round #198 (Div. 2) 题目链接:Maximal Area Quadrilateral Iahub has drawn a set of \(n\) points ...

  4. Codeforces Gym 100338B Geometry Problem 计算几何

    Problem B. Geometry ProblemTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudg ...

  5. Codeforces 1045E. Ancient civilizations 构造 计算几何 凸包

    原文链接https://www.cnblogs.com/zhouzhendong/p/CF1045E.html 4K码量构造题,CF血腥残暴! 题解 首先,如果所有点颜色相同,那么直接连个菊花搞定. ...

  6. Codeforces 1079D Barcelonian Distance(计算几何)

    题目链接:Barcelonian Distance 题意:给定方格坐标,方格坐标上有两个点A,B和一条直线.规定:直线上沿直线走,否则沿方格走.求A到B的最短距离. 题解:通过直线到达的:A.B两点都 ...

  7. codeforces 672C C. Recycling Bottles(计算几何)

    题目链接: C. Recycling Bottles time limit per test 2 seconds memory limit per test 256 megabytes input s ...

  8. Codeforces 499C:Crazy Town(计算几何)

    题目链接 给出点A(x1,y1),B(x2,y2),和n条直线(ai,bi,ci,aix + biy + ci = 0),求A到B穿过多少条直线 枚举每条直线判断A.B是否在该直线两侧即可 #incl ...

  9. codeforces749B

    Parallelogram is Back CodeForces - 749B 已知平行四边形的三个顶点,求第四个顶点可能的位置.Input输入有三行,每行包括两个整数x和y ( - 1000 ≤ x ...

随机推荐

  1. Eclipse设置注释模板

    设置注释模板的入口: Window->Preference->Java->Code Style->Code Template 然后展开Comments节点就是所有需设置注释的元 ...

  2. 弹出层js让DIV居中

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  3. 安装配置redis

    1.1查看当前系统环境 查看当前系统版本信息: 查看当前网络连通情况: 1.2使用yum安装 1.3确认redis的安装目录 1.4查看\修改配置文件 1.5启动redis服务并验证 1.6使用tel ...

  4. C# 特殊关键字

    1.static 表示被修饰的对象的生命周期与当前的应用程序域相同,因此可以在多个实例中共享 2.const 表示常量且只能在声明时赋值,因此const的常量在编译时就能确定,它如果没有被static ...

  5. 使用PowerShell向SharePoint中写入数据

    本文介绍了如何在命令行方式下, 创建自定义列表, 将外部数据导入到列表以及生成视图. $listname = "contact0422" $column_text = @( &qu ...

  6. 【iCore3 双核心板_ uC/OS-III】例程一:认识 uC/OS-III

    实验指导书及代码包下载: http://pan.baidu.com/s/1i4FuMep iCore3 购买链接: https://item.taobao.com/item.htm?id=524229 ...

  7. PHP的排序函数的总结

    Sort     破坏索引 升序    值排序 Rsort    破坏索引 降序    值排序 Asort    保持索引 升序     值排序 Arsort   保持索引 降序     值排序 Ks ...

  8. mac El Capitan 10.11.6

    http://bbs.pcbeta.com/forum.php?mod=viewthread&tid=1702502&authorid=4532202&page=1

  9. ArcGIS Server,4000端口被占用

    server使用的端口:http://resources.arcgis.com/zh-cn/help/main/10.2/index.html#//015400000537000000 cmd 输入命 ...

  10. 有关segue的简介

    - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {   ViewControllerB *vc = segue ...