Although there has been a lot of AVL tree libraries available now, nearly all of them are meant to work in the random access memory(RAM). Some of them do provide some mechanism for dumping the whole tree into a file and loading it back to the memory in order to make data in that tree persistent. It ...
解决时钟问题,acm竞赛题
A weird clock marked from 0 to 59 has only a minute hand. It won t move until a special coin is thrown into its box. There are different kinds of coins as your options. However once you make your choice, you cannot use any other kind. There are infinite number of coins of eac ...
数字运算,判断一个数是否接近素数
A Niven number is a number such that the sum of its digits divides itself. For example, 111 is a Niven number because the sum of its digits is 3, which divides 111. We can also specify a number in another base b, and a number in base b is a Niven number if the sum o ...
这是sun公司的程序员考试书籍(英文版的pdf)
还有模拟考试安装盘,和视频!我将稍后发布!
READ THIS AGREEMENT CAREFULLY. IF YOU AGREE TO ALL THE TERMS AND CONDITIONS SET FORTH BELOW AND ARE WILLING TO BE LEGALLY BOUND BY THEM, PRESS THE I AGREE BUTTON TO CONTINUE WITH THE SETUP. IF YOU DO NOT AGREE TO S ...
MFC Black Book
Introduction:
Are you an MFC programmer? Good. There are two types of MFC programmers. What kind are you? The first kind are the good programmers who write programs that conform to the way MFC wants you to do things. The second bunch are wild-eyed anarchists who insist on getting thin ...
These instructions assume that the 1.4 versions of the java
and appletviewer commands are in your path. If they aren t,
then you should either specify the complete path to the commands
or update your PATH environment variable as described in the
installation instructions for the Java 2 SDK.
2^x mod n = 1 acm竞赛题 Give a number n, find the minimum x that satisfies 2^x mod n = 1.
Input
One positive integer on each line, the value of n.
Output
If the minimum x exists, print a line with 2^x mod n = 1.
Print 2^? mod n = 1 otherwise.
You should replace x and n with specific numbers. ...
* Function:
* 1. Replace the first oldstr with newstr in srcstr
* Arguments:
* IN :
* srcstr
* oldstr
* newstr
* OUT :
* srcstr
* Return:
* 1. If find and replace one oldstr with newstr in srcstr , return 1
* 2. If find no oldstr in srcstr , return 0
* 3. If error (malloc return NULL) ...
Routine mampres: To obtain amplitude response from h(exp(jw)).
input parameters:
h :n dimensioned complex array. the frequency response is stored
in h(0) to h(n-1).
n :the dimension of h and amp.
fs :sampling frequency (Hz).
iamp:If iamp=0: The Amplitude Res. amp(k)=abs(h(k))
If iamp=1: The ...