Permutation p is
an ordered set of integers p1,??p2,??...,??pn,
consisting of n distinct positive integers, each of them doesn't exceed n.
We'll denote the i-th element of permutation p as pi.
...
分类:
其他好文 时间:
2014-07-22 23:00:15
阅读次数:
312
这里把EEPROM
24c02封装起来,今后可以直接调用,其连线方式为:SDA-P2.1;SCL-P2.0;WP-VCC>__ //头文件的包含 7 #include 8
#define _Nop() _nop_() //定义空指令 9 /*----------...
分类:
其他好文 时间:
2014-05-12 16:04:34
阅读次数:
427
http://blog.csdn.net/r91987/article/details/5435328PPM文件格式分三种:1.
PPM灰度文件 文件头由3行文本组成,可由fgets读出 1)第一行为“P2",表示文件类型 2)第二行为图像的宽度和高度 3)第三行为最大的象素值255
接下来是图像数...
分类:
其他好文 时间:
2014-05-07 10:46:18
阅读次数:
283
>_____ 2 3 #ifndef __DISPLAY_H__ 4 #define
__DISPLAY_H__ 5 6 #define DataPort P0 //定义数据端口 程序中遇到DataPort 则用P0 替换 7 sbit
LATCH1=P2^2;//定义锁存使能端口 段锁存 8 .....
分类:
其他好文 时间:
2014-05-06 00:40:48
阅读次数:
407
1 Arrays.sort(points, new comparator());2 3
public static class comparator implements Comparator {4 public int compare(Point
p1, Point p2) {5 ...
分类:
编程语言 时间:
2014-05-05 23:32:10
阅读次数:
444
题意:求1、1/x+1/y=1/z 给定z 求x,y的个数zsd:1:
要知道这个素数的因子的范围 范围为2——sqrt(n);2:带入方程得:x = n * n / k + n
;现在就变成了求x的值。又因为n一定大于k,所以转换成求n * n的分解数;因为n = p1 ^ e1 * p2 ^ ....
分类:
其他好文 时间:
2014-05-01 03:31:17
阅读次数:
256
1.中点画圆算法(1)P为当前点亮象素,那么,下一个点亮的象素可能是P1(Xp+1,Yp)或P2(Xp+1,Yp+1)。(2)构造函数:F(X,Y)=X2+Y2-R2;则F(X,Y)=0(X,Y)在圆上;F(X,Y)0(X,Y)在圆外。设M为P1、P2间的中点,M=(Xp+1,Yp-0.5)有如下结...
分类:
其他好文 时间:
2014-04-27 17:18:18
阅读次数:
901