随笔分类 - 数论-几何
摘要:Description Your task is to write a program, which, given two circles, calculates the area of their intersection with the accuracy of three digits aft
阅读全文
摘要:A sheep lives on an infinite field. The sheep wants to eat some grass. Grass only exists in one place. That place is a circle defined by a center poin
阅读全文
摘要:斐波那契数列的定义如下: F(0) = 0 F(1) = 1 F(n) = F(n - 1) + F(n - 2) (n >= 2) (1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, ...) 给出n,求F(n),由于结果很大,输出F(n)
阅读全文
摘要:Description Bessie, Farmer John's prize cow, has just won first place in a bovine beauty contest, earning the title 'Miss Cow World'. As a result, Bes
阅读全文
摘要:double EPS = 1e-10; double add(double a,double b) { if(abs(a+b) < EPS * (abs(a) + abs(b))) return 0; return a + b; } struct Point{ double x, y; Point(){} Point(double x, double y)...
阅读全文
摘要:Description A student named Round Square loved to play with cones. He would arrange cones with different base radii arbitrarily on the floor and would
阅读全文
摘要:Description In the game of Jack Straws, a number of plastic or wooden "straws" are dumped on the table and players try to remove them one-by-one witho
阅读全文
摘要:Problem Description 有很多从磁盘读取数据的需求,包括顺序读取、随机读取。为了提高效率,需要人为安排磁盘读取。然而,在现实中,这种做法很复杂。我们考虑一个相对简单的场景。磁盘有许多轨道,每个轨道有许多扇区,用于存储数据。当我们想在特定扇区来读取数据时,磁头需要跳转到特定的轨道、具体
阅读全文
摘要:题目大意:任意△ABC中F、D、E分别为三边的三等分点中点,将其分别与对应的顶点相连,得到一个新的△RPQ。 现在给出△ABC的坐标,求△RPQ的面积 解题思路:求出△ABC的面积三角形 ABC 的面积 可以证明:S△BPQ :S△ABC = 1 : 7 也可以用每个边用向量缩减三倍求三分点,然后求
阅读全文
摘要:给定n行m列个正方形,求可以组成多少个三角形。 如1×2,有18个。 总的点有N个,那个答案就是C(N,3),然后减去横向、竖向、斜向的三点共线的个数即可,斜线三点共线等价于所枚举的矩形的长宽成倍数关系,即gcd不为1。(这个想不懂,先放在这)
阅读全文
摘要:给出圆的圆心和半径,以及三角形的三个顶点,问圆同三角形是否相交。相交输出"Yes",否则输出"No"。(三角形的面积大于0)。 Input Output Input示例 Output示例
阅读全文
摘要:给出三维空间上的四个点(点与点的位置均不相同),判断这4个点是否在同一个平面内(4点共线也算共面)。如果共面,输出"Yes",否则输出"No"。 Input Output Input示例 Output示例
阅读全文
摘要:Problem Description On a two-dimensional plane, give you n integer points. Your task is to figure out how many different regular polygon these points
阅读全文