POJ 1971 Parallelogram Counting
来源:互联网 发布:足球竞赛编程 编辑:程序博客网 时间:2024/04/29 04:42
题目链接 : http://poj.org/problem?id=1971
题意 : 给你n(n <= 1000)个点, 问你有多少个平行四边形。
思路 : 一开始我是枚举每一条有向边, 因为两条边相等且方向一样的话就可以够成一个平行四边形,数出所有的之后减去一些三点一线的, 然后除2(一个四边形有两对平行边)就可以获得正确答案了。O(n ^ 2 * log (n ^ 2))的复杂度, 但是可能常数有点大(我实现需要两次排序, 并且还要二分查找)吧还是我写挫了, 一直TLE,后来发现其实可以用另一个判断平行四边形的方法来做这一道题目 : 平行四边形的对角连线互相平分。 这样只要枚举中点,对于中点一次排序就可以完成了, 然后就变成简单题了。
0 0
- poj 1971 Parallelogram Counting
- POJ 1971 Parallelogram Counting
- POJ 1971 Parallelogram Counting
- poj 1971 Parallelogram Counting
- POJ 1971 Parallelogram Counting
- poj 1971 Parallelogram Counting
- POJ 1971 Parallelogram Counting
- poj 1971 Parallelogram Counting(数学题)
- POJ 1971 Parallelogram Counting【平面几何】
- POJ-----1971Parallelogram Counting数学题
- Parallelogram Counting(POJ 1971)
- POJ 1971 Parallelogram Counting 笔记
- POJ 1971 Parallelogram Counting 解题报告
- POJ 1971 Parallelogram Counting(枚举+HASH)
- LightOJ 1058 & Poj 1971 Parallelogram Counting
- POJ 1971 Parallelogram Counting (Hash)
- poj 1971 Parallelogram Counting 排序 + 计数
- POJ 1971 Parallelogram Counting(hash)
- nltk.download()下载失败的解决办法
- container_of 理解
- Activti跳过中间节点的helloworld实例程序
- 求两个整数的平方和--嵌套调用函数
- string的成员用法
- POJ 1971 Parallelogram Counting
- 关于代码,关于编程,关于梦想
- VB枚举控件属性
- 山东理工大学ACM平台题答案关于C语言 1164 C语言实验——矩阵转置
- C#与C++/CLI混合编程
- uva 10317 - Equating Equations(dfs)
- Contacts中Intent对象的使用
- Linux运维常用命令
- 杭电1052