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 listAug 4, 2022 19:57Franek KortaFranek KortaScore: 110,343Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 4, 2022 19:57107,498103,583,55439,774,15302,265,088
2Aug 4, 2022 19:57108,006107,174,91439,962,35702,256,896
3Aug 4, 2022 19:57108,48163,852,18038,132,0002,006,0002,273,280
4Aug 4, 2022 19:57109,180102,765,48940,396,74202,265,088
5Aug 4, 2022 19:57109,26264,111,93638,406,0002,021,0002,285,568
6Aug 4, 2022 19:57110,00871,152,07039,686,0001,017,0002,281,472
7Aug 4, 2022 19:57110,34370,894,50738,836,0001,991,0002,281,472
8Aug 4, 2022 19:57110,57064,892,83536,920,0003,991,0002,285,568
9Aug 4, 2022 19:57111,01462,904,95839,072,0002,003,0002,281,472
10Aug 4, 2022 19:57111,13264,132,72537,108,0004,011,0002,527,232
11Aug 4, 2022 19:57111,53067,054,22839,253,0002,013,0002,281,472
12Aug 4, 2022 19:57112,03064,944,62741,451,00002,355,200