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 21:26Franek KortaFranek KortaScore: 90,927Success
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 21:2687,74496,954,03132,465,33102,289,664
2Apr 9, 2023 21:2688,10057,907,29332,597,00002,269,184
3Apr 9, 2023 21:2688,17387,350,68632,624,02402,293,760
4Apr 9, 2023 21:2688,19262,154,85232,631,00002,428,928
5Apr 9, 2023 21:2688,33859,346,85232,685,00002,428,928
6Apr 9, 2023 21:2689,55592,022,37233,135,35002,277,376
7Apr 9, 2023 21:2689,778103,529,06233,218,03702,174,976
8Apr 9, 2023 21:2689,79558,023,58832,218,0001,006,0002,433,024
9Apr 9, 2023 21:2690,15454,097,44232,347,0001,010,0002,420,736
10Apr 9, 2023 21:2690,28655,247,62432,394,0001,012,0002,527,232
11Apr 9, 2023 21:2690,46855,777,59232,459,0001,014,0002,523,136
12Apr 9, 2023 21:2690,487108,089,10233,480,06802,297,856
13Apr 9, 2023 21:2690,92765,870,48631,604,0002,039,0002,531,328
14Apr 9, 2023 21:2690,94365,960,89432,630,0001,019,0002,424,832
15Apr 9, 2023 21:2691,40792,652,25933,820,50402,174,976
16Apr 9, 2023 21:2691,68455,667,48931,928,0001,995,0002,527,232
17Apr 9, 2023 21:2691,85757,172,77130,989,0002,998,0002,428,928
18Apr 9, 2023 21:2692,11956,531,72033,082,0001,002,0002,531,328
19Apr 9, 2023 21:2692,22261,429,92933,119,0001,003,0002,265,088
20Apr 9, 2023 21:2692,28659,892,02633,142,0001,004,0002,437,120
21Apr 9, 2023 21:2692,89756,502,87331,340,0003,032,0002,428,928
22Apr 9, 2023 21:2693,35955,956,74834,543,00002,437,120
23Apr 9, 2023 21:2694,62460,003,38534,011,0001,000,0002,527,232
24Apr 9, 2023 21:2695,88658,434,18235,478,00002,433,024