2016武汉科技大学邀请赛现场赛 B题
来源:互联网 发布:淘宝买家手机号提取 编辑:程序博客网 时间:2024/04/28 05:25
I Wanna Plant Trees!
Time Limit: 2 Sec Memory Limit: 128 MB 64bit IO Format: %lldSubmitted: 80 Accepted: 17
[Submit][Status][Web Board]
Description
There are so many trees in WUST!
Now! ACMers from Wuhan is going to plant some trees in WUST!
First, they need to sell some trees (QAQ).
LL bought an excavator, it is said that the excavator is made by the School of Lanxiang and APTECH. It could dig out so many trees, but it is too noisy. So the excavator could only be used for once, and pass a straight line. It will dig out every tree on the line.
LL wants to know the maximum number of the trees could be dug out.
Input
The first line of input contains the number of test caseT(T<=10) . The descriptions of the test cases follow:
The first line of each test case contains a single positive integer n(n<=890) - the number of the trees.
Each of the following line contains two integers, x and y , the coordinate of each tree.
Output
For each test case, output a single integer - maximum number of the trees could be dug out.
Sample Input
230 01 12 230 01 10 1
Sample Output
32
题意:平面上由n个点,现在要统计最多有多少个点在同一条直线上。
题解:这个要用STL,通过map去枚举所有的方向向量。
- 2016武汉科技大学邀请赛现场赛 B题
- 2016武汉科技大学邀请赛现场赛 L
- 2016武汉科技大学邀请赛现场赛 A题
- 2016武汉科技大学邀请赛现场赛 C题
- 2016武汉科技大学邀请赛现场赛 D题
- 2016武汉科技大学邀请赛现场赛 E题
- 2016武汉科技大学邀请赛现场赛 F题
- 2016武汉科技大学邀请赛现场赛 G题
- 2016年武汉科技大学邀请赛网络赛 B题
- 2016年武汉科技大学邀请赛网络赛 A题
- 2016年武汉科技大学邀请赛网络赛 J题
- 2016年武汉科技大学邀请赛网络赛 D题
- 2016年武汉科技大学邀请赛网络赛 C题
- 2016年武汉科技大学邀请赛网络赛 E题
- 2016年武汉科技大学邀请赛网络赛 F题
- 2016年武汉科技大学邀请赛网络赛 G题
- 2016年武汉科技大学邀请赛网络赛 H题
- 2016年武汉科技大学邀请赛网络赛 I题
- hdu1234开门人和关门人(水题)
- 使用广播 更新Fragment
- JVM调优总结(3):垃圾回收面临的问题
- luac 编译器
- 线性代数导论5——SVD分解
- 2016武汉科技大学邀请赛现场赛 B题
- UITableView 调整分割线长度 等不常用属性总结
- R语言︱SNA-社会关系网络—igraph包(社群划分、画图)(三)
- bean继承
- firefox打开紧临页面设置
- React Native的Navigator详解
- css auto那些事
- 实习期间第二个小程序
- 用流读写csv文件