摘要: IntersectionTime Limit:1000MSMemory Limit:10000KTotal Submissions:7609Accepted:1989DescriptionYou 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)end point: (11,2)rectangle: left-top: (1,5)right-bottom: (7,1)Figur 阅读全文
posted @ 2012-05-06 21:37 Stephen Li 阅读(1106) 评论(0) 推荐(0) 编辑
摘要: TriangleTime Limit:1000MSMemory Limit:65536KTotal Submissions:3627Accepted:1586DescriptionAlattice pointis an ordered pair (x,y) wherexandyare both integers. Given the coordinates of the vertices of a triangle (which happen to be lattice points), you are to count the number of lattice points which l 阅读全文
posted @ 2012-05-06 19:58 Stephen Li 阅读(384) 评论(0) 推荐(0) 编辑
摘要: Costume PartyTime Limit:1000MSMemory Limit:65536KTotal Submissions:9132Accepted:3552DescriptionIt's Halloween! Farmer John is taking the cows to a costume party, but unfortunately he only has one costume. The costume fits precisely two cows with a length ofS(1 ≤S≤ 1,000,000). FJ hasNcows (2 ≤N≤ 阅读全文
posted @ 2012-05-06 17:47 Stephen Li 阅读(797) 评论(0) 推荐(0) 编辑
摘要: Beauty ContestTime Limit:3000MSMemory Limit:65536KTotal Submissions:19373Accepted:5850DescriptionBessie, Farmer John's prize cow, has just won first place in a bovine beauty contest, earning the title 'Miss Cow World'. As a result, Bessie will make a tour of N (2 <= N <= 50,000) fa 阅读全文
posted @ 2012-05-06 17:12 Stephen Li 阅读(275) 评论(0) 推荐(0) 编辑
摘要: WallTime Limit:1000MSMemory Limit:10000KTotal Submissions:21731Accepted:7132DescriptionOnce upon a time there was a greedy King who ordered his chief Architect to build a wall around the King's castle. The King was so greedy, that he would not listen to his Architect's proposals to build a b 阅读全文
posted @ 2012-05-06 16:12 Stephen Li 阅读(279) 评论(0) 推荐(0) 编辑