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 20:04Franek KortaFranek KortaScore: 100,638Success
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 20:0497,63859,830,46534,119,0002,007,0002,535,424
2Aug 4, 2022 20:0498,65160,376,38536,501,00002,281,472
3Aug 4, 2022 20:0499,27068,633,47833,670,0003,060,0002,514,944
4Aug 4, 2022 20:0499,35963,994,23935,770,000993,0002,281,472
5Aug 4, 2022 20:0499,69761,986,66234,839,0002,049,0002,281,472
6Aug 4, 2022 20:04100,23563,115,36735,083,0002,004,0002,531,328
7Aug 4, 2022 20:04100,63863,257,48535,224,0002,012,0002,281,472
8Aug 4, 2022 20:04101,08662,358,91536,392,0001,010,0002,527,232
9Aug 4, 2022 20:04101,32759,810,08735,465,0002,026,0002,281,472
10Aug 4, 2022 20:04102,110121,197,34937,780,78102,273,280
11Aug 4, 2022 20:04103,84797,060,07738,423,29902,252,800
12Aug 4, 2022 20:04107,37999,543,17839,730,15302,220,032