Home > Back-end >  Could you tell me how to calculate a 100000 number of arrays, and not repeat number 1-50000
Could you tell me how to calculate a 100000 number of arrays, and not repeat number 1-50000

Time:09-19

As title, feel the amount of data is very large, head a blank, using c language implementation, beg god to solve!

CodePudding user response:

Multithreading technology, can be used to block the large arrays, each thread is a small part of the sum

CodePudding user response:

Thank invited, due to server maintenance, I can't see your links in the specific problems,
But look at the title because he was a 100000 number array sum,
Agree with # 1/f, you might also consider a reference ,

CodePudding user response:

"For 1-50000 don't repeat the number of us" is what? Value of 1-50000 not repeating element combination, or?

CodePudding user response:

reference DelphiGuy reply: 3/f
1-50000 "o not repeat number" is what? Value of 1-50000 not repeating element combination, or?


The should be and, how many?

CodePudding user response:

reference 4 floor u010165006 response:
Quote: reference DelphiGuy reply: 3/f

"For 1-50000 don't repeat the number of us" is what? Value of 1-50000 not repeating element combination, or?


The should be and, how many?


Indeed, C (100000, XXXXX) can frighten dead, letting the light of the taihu lake are not necessarily really,

CodePudding user response:

If it is not to repeat the number of 1-50000 and it is simpler,
Bitmap method:
Int E [50000]; Used to store 1-50000, the number of occurrences of all initialized to 0,
Scan the array of 100000 number, if a particular element in the interval [1.. 50000], the corresponding element E + 1,
Scanning E, accumulative exactly corresponding values of 1 element,
  • Related