题目链接:http://poj.org/problem?id=1269 题面: Description We all know that a pair of distinct points on a plane defines a line and that a pair of lines on a plane will intersect in one of three ways: 1) no intersection because they are parallel, 2) interse…
题目链接:http://poj.org/problem?id=2318 题面: TOYS Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 17413 Accepted: 8300 Description Calculate the number of toys that land in each bin of a partitioned toy box. Mom and dad have a problem - the…
rt,计算几何入门: TOYS Calculate the number of toys that land in each bin of a partitioned toy box. Mom and dad have a problem - their child John never puts his toys away when he is finished playing with them. They gave John a rectangular box to put his toy…
题目传送门:POJ 1269 Intersecting Lines Description We all know that a pair of distinct points on a plane defines a line and that a pair of lines on a plane will intersect in one of three ways: 1) no intersection because they are parallel, 2) intersect in…
Pick-up sticks Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 11335 Accepted: 4250 Description Stan has n sticks of various length. He throws them one at a time on the floor in a random way. After finishing throwing, Stan tries to fin…
题意: 判断直线间位置关系: 相交,平行,重合 include <iostream> #include <cstdio> using namespace std; struct Point { int x , y; Point(, ) :x(a), y(b) {} }; struct Line { Point s, e; int a, b, c;//a>=0 Line() {} Line(Point s1,Point e1) : s(s1), e(e1) {} void…
Intersecting Lines Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 8342 Accepted: 3789 Description We all know that a pair of distinct points on a plane defines a line and that a pair of lines on a plane will intersect in one of three…
题目链接:POJ 1269 Problem Description We all know that a pair of distinct points on a plane defines a line and that a pair of lines on a plane will intersect in one of three ways: 1) no intersection because they are parallel, 2) intersect in a line becau…
Intersecting Lines Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 12421 Accepted: 5548 Description We all know that a pair of distinct points on a plane defines a line and that a pair of lines on a plane will intersect in one of three…