Glibc 的 strcmp
Glibc的设计确实巧妙的让人想不到,如下strcmp的代码就十分巧妙:
C语言: Codee#12462
int
strcmp (p1, p2)
const char p1;
const char p2;
{
register const unsigned char s1 = (const[......]
Glibc的设计确实巧妙的让人想不到,如下strcmp的代码就十分巧妙:
C语言: Codee#12462
int
strcmp (p1, p2)
const char p1;
const char p2;
{
register const unsigned char s1 = (const[......]
在<<Linux 内核完全注释>>里面看到了几次xor ax, ax,很想不通,为什么不直接用mov ax, 0呢?今日到网上一搜才知道,我的天啊,xor ax, ax 只需要计算机2条指令,而mov ax, 0会消耗计算机5指令,什么意思?就是近三倍的速度差别。
[……]
as86(1) &n[……]
这题二话不说, 用map[i][j]表示坐标为i, j的点是什么颜色的.. 很快就写出来了, 但是内存超过了,, 内存最多16MB.
没办法, 只好另辟思路, 但是在数据压缩方面我又很弱, 就看标程也花了两三天的时间, 今天终于是看懂了..
用rect记录所有矩形的坐标以及相应的颜色.
程序具体的步[……]
从这一题开始,, 以后题目我就不贴上来了… 自己去看吧..
这一题开始肯本看不懂,, 后来是反反复复看标程看懂了..
首先要理解这么一个式子吧(算是式子吧“)
已经求出了j-1个丑数,, 现在求第j个丑数
对于每一个素数p乘以一个最小的丑数, 能使积大于第j-1个丑数
在这些乘积中寻[……]
Score Inflation
The more points students score in our contests, the happier we here at the USACO are. We try to design our contests so that people can[……]
Agri-Net
Russ Cox
Farmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity to all farms in the[……]
Fractions to Decimals
Write a program that will accept a fraction of the form N/D, where N is the numerator and D is the denominator and print the dec[……]
Bessie Come Home
Kolstad & Burch
It’s dinner time, and the cows are out in their separate pastures. Farmer John rings the bell so they will start[……]