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 3, 2022 18:53Franek KortaFranek KortaScore: 100,322Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 3, 2022 18:5398,71659,454,28333,482,0003,043,0002,355,200
2Aug 3, 2022 18:5398,85962,574,27535,562,0001,016,0002,281,472
3Aug 3, 2022 18:5399,21464,137,10635,690,0001,019,0002,527,232
4Aug 3, 2022 18:5399,61969,018,69533,871,0002,988,0002,514,944
5Aug 3, 2022 18:5399,83257,799,08635,940,000998,0002,281,472
6Aug 3, 2022 18:53100,03862,060,81836,014,0001,000,0002,281,472
7Aug 3, 2022 18:53100,32264,637,44134,110,0003,009,0002,281,472
8Aug 3, 2022 18:53101,63862,392,66935,574,0002,032,0002,269,184
9Aug 3, 2022 18:53102,23261,506,60433,845,0003,981,0002,281,472
10Aug 3, 2022 18:53102,48099,127,48637,917,43602,252,800
11Aug 3, 2022 18:53102,955109,032,31138,093,29602,260,992
12Aug 3, 2022 18:53103,431100,608,23138,269,40602,256,896