There are n lines l1,l2,…,ln on the 2D-plane. Staring at these lines, Calabash is wondering how many pairs of (i,j) that 1≤i<j≤n and li,lj share at least one common point. Note that two overlapping lines also share common points. Please write a progr…
Geometric Shapes Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 1243 Accepted: 524 Description While creating a customer logo, ACM uses graphical utilities to draw a picture that can later be cut into special fluorescent materials. To…
Intersection Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 9996 Accepted: 2632 Description You are to write a program that has to decide whether a given line segment intersects a given rectangle. An example: line: start point: (4,9) …
转载请注明出处: http://www.cnblogs.com/fraud/ ——by fraud Jack Straws Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 3512 Accepted: 1601 Description In the game of Jack Straws, a number of plastic or wooden "straws" are dumped o…
Intersecting Lines Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 13605 Accepted: 6049 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…