CC

自然万物都趋向从有序变得无序

0%

题目链接:点我

题目


There is a set of matrixes that are constructed subject to the following constraints:
1. The matrix is a S(n)×S(n) matrix;
2. S(n) is the sum of the first n Fibonacci numbers modulus m, that is S(n) = (F1 + F2 + … + Fn) % m;
3. The matrix contains only three kinds of integers ‘0’, ‘1’ or ‘-1’;
4. The sum of each row and each column in the matrix are all different.
Here, the Fibonacci numbers are the numbers in the following sequence: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, …

阅读全文 »

一。点,线,面,形基本关系,点积叉积的理解

POJ 2318 TOYS(推荐)
http://acm.pku.edu.cn/JudgeOnline/problem?id=2318
POJ 2398 Toy Storage(推荐)
http://acm.pku.edu.cn/JudgeOnline/problem?id=2398
一个矩形,有被若干直线分成N个格子,给出一个点的坐标,问你该点位于哪个点中。
知识点:其实就是点在凸四边形内的判断,若利用叉积的性质,可以二分求解。

阅读全文 »

计算几何题目推荐.


数学小知识:

  1. 拉姆齐定理 - 维基百科 : 离散数学老师将过一个一个小例子.六个人中必定有三个人互相认识或者不认识,

  2. 调和级数求和公式 - 维基百科: Sn=ln(n+1)+C=ln(n)+C1.0/(n2)S_n = ln(n+1) + C = ln(n) + C - 1.0 / (n * 2) ,欧拉常数C = 0.57721566490153286060651209;

    阅读全文 »

题目链接:点我

题目


Our bear’s forest has a checkered field. The checkered field is an n × n table, the rows are numbered from 1 to n from top to bottom, the columns are numbered from 1 to n from left to right. Let’s denote a cell of the field on the intersection of row x and column y by record (x, y). Each cell of the field contains growing raspberry, at that, the cell (x, y) of the field contains x + y raspberry bushes.
The bear came out to walk across the field. At the beginning of the walk his speed is (dx, dy). Then the bear spends exactly t seconds on the field. Each second the following takes place:

阅读全文 »

题目链接:点我

题目


Everyone knows what the Fibonacci sequence is. This sequence can be defined by the recurrence relation:
F1 = 1, F2 = 2, Fi = Fi - 1 + Fi - 2 (i > 2).

We'll define a new number sequence Ai(k) by the formula:
Ai(k) = Fi × i^k (i ≥ 1).

In this problem, your task is to calculate the following sum: A1(k) + A2(k) + ... + An(k). The answer can be very large, so print it modulo 1000000007 (109 + 7).
阅读全文 »

题目链接:点我

题目


 A sequence S n is defined as:

这里写图片描述

Where a, b, n, m are positive integers.┌x┐is the ceil of x. For example, ┌3.14┐=4. You are to calculate S n.
  You, a top coder, say: So easy!
阅读全文 »