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 27, 2023 20:03Franek KortaFranek KortaScore: 102,881Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 27, 2023 20:03101,44960,289,10237,536,00002,531,328
2Aug 27, 2023 20:03101,60364,742,48736,577,0001,016,0002,437,120
3Aug 27, 2023 20:03101,74368,934,79335,611,0002,034,0002,269,184
4Aug 27, 2023 20:03101,83563,096,97636,633,0001,046,0002,531,328
5Aug 27, 2023 20:03102,30066,364,90237,851,00002,269,184
6Aug 27, 2023 20:03102,83063,250,95036,045,0002,002,0002,441,216
7Aug 27, 2023 20:03102,88160,998,28537,065,0001,001,0002,531,328
8Aug 27, 2023 20:03103,49562,563,00238,293,00002,269,184
9Aug 27, 2023 20:03103,75460,292,92937,379,0001,010,0002,531,328
10Aug 27, 2023 20:03108,818111,288,41940,262,54302,285,568
11Aug 27, 2023 20:03108,999107,069,85140,329,59302,281,472
12Aug 27, 2023 20:03109,443106,332,00340,493,83302,289,664