TopK Sergey Svistunov

Find the sum of the 100 largest values in a stream of binary integers as fast as possible.

Input: 100 000 000 uint32 values in little-endian binary on STDIN (4 bytes each).

Output: The uint64 sum of the top 100 greatest values, printed as a decimal string.

Back to listApr 9, 2023 20:21Franek KortaFranek KortaScore: 105,541Success
Source Code

Source code access is restricted. Log in to request access.

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 9, 2023 20:2291,46860,227,32231,853,0001,990,0002,531,328
2Apr 9, 2023 20:2291,48659,034,05432,855,000995,0002,400,256
3Apr 9, 2023 20:2291,62253,039,00432,903,000997,0002,412,544
4Apr 9, 2023 20:2291,71153,710,32530,939,0002,994,0002,408,448
5Apr 9, 2023 20:2291,74955,538,78232,949,000998,0002,527,232
6Apr 9, 2023 20:2292,01157,941,83132,042,0002,002,0002,527,232
7Apr 9, 2023 20:2292,45456,955,45630,184,0004,024,0002,265,088
8Apr 9, 2023 20:2292,58656,811,58230,227,0004,030,0002,531,328
9Apr 9, 2023 20:2292,63253,650,40133,266,0001,008,0002,531,328
10Apr 9, 2023 20:22102,916109,311,48738,078,88102,297,856
11Apr 9, 2023 20:22105,22598,686,77838,933,21502,285,568
12Apr 9, 2023 20:21105,33262,110,63436,922,0002,051,0002,531,328
13Apr 9, 2023 20:21105,54158,772,94638,049,0001,001,0002,269,184
14Apr 9, 2023 20:21105,79767,258,04936,134,0003,011,0002,527,232
15Apr 9, 2023 20:21106,38671,844,52537,345,0002,018,0002,531,328
16Apr 9, 2023 20:21106,39758,168,19236,339,0003,028,0002,269,184
17Apr 9, 2023 20:22106,559107,847,03439,426,66502,297,856
18Apr 9, 2023 20:21108,07861,936,73238,990,000999,0002,531,328
19Apr 9, 2023 20:21108,45993,593,51540,129,99102,297,856
20Apr 9, 2023 20:21108,88665,698,90539,281,0001,007,0002,265,088
21Apr 9, 2023 20:21109,38164,001,07538,448,0002,023,0002,408,448
22Apr 9, 2023 20:21109,48791,391,17740,510,29302,293,760
23Apr 9, 2023 20:21109,951111,421,48640,681,85002,170,880
24Apr 9, 2023 20:21111,54661,774,78739,259,0002,013,0002,531,328