138 - Street Numbers

 #include <stdio.h>
//(2n+1)^2 - 8m^2 = 1,佩尔函数,或者打表
int main() {
int count = ;
int x1 = , xi = , y1= , yi = , n = , txi;
while (count++ < )
{
txi = xi;
xi = x1 * xi + n * y1 * yi;
yi = x1 * yi + y1 * txi;
printf("%10d%10d\n", yi, (xi - ) / );
}
return ;
}

Volume 6. Mathematical Concepts and Methods的更多相关文章

  1. AOAPC I: Beginning Algorithm Contests (Rujia Liu) Volume 6. Mathematical Concepts and Methods

    uva 106 这题说的是 说计算 x^2 + y^2  =  z^2  xyz 互质 然后计算个数和 在 N内 不在 勾股数之内的数的个数 然后去找需要的 维基百科上 看到 另 n*m*2 =b   ...

  2. UVA题目分类

    题目 Volume 0. Getting Started 开始10055 - Hashmat the Brave Warrior 10071 - Back to High School Physics ...

  3. (Step1-500题)UVaOJ+算法竞赛入门经典+挑战编程+USACO

    http://www.cnblogs.com/sxiszero/p/3618737.html 下面给出的题目共计560道,去掉重复的也有近500题,作为ACMer Training Step1,用1年 ...

  4. ACM训练计划step 1 [非原创]

    (Step1-500题)UVaOJ+算法竞赛入门经典+挑战编程+USACO 下面给出的题目共计560道,去掉重复的也有近500题,作为ACMer Training Step1,用1年到1年半年时间完成 ...

  5. UVA10375 Choose and divide 质因数分解

    质因数分解: Choose and divide Time Limit: 3000MS   Memory Limit: Unknown   64bit IO Format: %lld & %l ...

  6. 算法竞赛入门经典+挑战编程+USACO

    下面给出的题目共计560道,去掉重复的也有近500题,作为ACMer Training Step1,用1年到1年半年时间完成.打牢基础,厚积薄发. 一.UVaOJ http://uva.onlinej ...

  7. Think Python - Chapter 17 - Classes and methods

    17.1 Object-oriented featuresPython is an object-oriented programming language, which means that it ...

  8. (转)Awesome Courses

    Awesome Courses  Introduction There is a lot of hidden treasure lying within university pages scatte ...

  9. Fundamentals of Computer Graphics 中文版(第二版) (Peter Shirley 著)

    1 引言 2 数学知识 3 光栅算法 4 信号处理 5 线性代数 6 矩阵变换 7 观察 8 隐藏面消除 9 表面明暗处理 10 光线追踪 11 纹理映射 12 完整的图形流水线 13 图形学的数据结 ...

随机推荐

  1. python-----删除同一文件夹下相似的图片

    最近整理图片发现,好多图片都非常相似,于是写如下代码去删除,有两种方法: 注:第一种方法只对于连续图片(例一个视频里截下的图片)准确率也较高,其效率高:第二种方法准确率高,但效率低 方法一:相邻两个文 ...

  2. softmax function in c++

    #include <iostream> #include <vector> #include <cmath> #include <algorithm> ...

  3. libpcap 中调用ctime()时警告提示:

    warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘int’ [-Wformat=]    ...

  4. bzoj 1579: [Usaco2009 Feb]Revamping Trails 道路升级【分层图+spfa】

    至死不用dijskstra系列2333,洛谷上T了一个点,开了O2才过 基本想法是建立分层图,就是建k+1层原图,然后相邻两层之间把原图的边在上一层的起点与下一层的终点连起来,边权为0,表示免了这条边 ...

  5. Python之列表生成式、生成器

    列表生成式 ——可以快速生成list,可以通过一个list推导出另一个list,而代码却十分简洁: >>> [x * x for x in range(1, 11)] [1, 4, ...

  6. [C陷阱和缺陷] 第7章 可移植性缺陷

      C语言在许多不同的系统平台上都有实现.的确,使用C语言编写程序的一个首要原因就是,C程序能够方便地在不同的编程环境中移植.   不同的系统有不同的需求,因此我们应该能够预料到,机器不同则其上的C语 ...

  7. 2017 ACM-ICPC 亚洲区(南宁赛区)网络赛 Minimum Distance in a Star Graph

    In this problem, we will define a graph called star graph, and the question is to find the minimum d ...

  8. hdu5926Mr. Frog’s Game

    Mr. Frog's Game Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) ...

  9. MyEclipse日志文件目录

    MyEclipse存放日志的目录为: <Workspace_Root>/.metadata/.log 在该目录下存放了日志的存档和当前日志,通过该日志可以查看MyEclipse的错误信息.

  10. 用Movie显示gif(1)SimpleGif

    代码如下: import android.content.Context; import android.graphics.Canvas; import android.graphics.Movie; ...