If user is really not satisfied with general rand(), then use rand(timestamp) to generate a seed, and use CBC encryption to generate rest of numbers. Again the algorithm doesn't guarantee you anything, but you can use a silly search to find if there is any duplicated number. 5000 is not a big data.
there is no proved real random generator algorithm
Only sudo-random generator is available. 5000 non-repeating is not difficult.
If user is really not satisfied with general rand(), then use rand(timestamp) to generate a seed, and use CBC encryption to generate rest of numbers. Again the algorithm doesn't guarantee you anything, but you can use a silly search to find if there is any duplicated number. 5000 is not a big data.
If user is really not satisfied with general rand(), then use rand(timestamp) to generate a seed, and use CBC encryption to generate rest of numbers. Again the algorithm doesn't guarantee you anything, but you can use a silly search to find if there is any duplicated number. 5000 is not a big data.
所有跟帖:
• Why you two are so serious about this. I was just -ppzcgg- ♀ (87 bytes) () 12/01/2006 postreply 19:48:52