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 listMay 22, 2024 17:27Joad NacerJoad NacerError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 22, 2024 17:2700000Error: expected "429496468093 ", got "416611581278 "
2May 22, 2024 17:2764,41652,686,23022,841,000993,0002,289,664
3May 22, 2024 17:2764,46554,869,89321,865,0001,987,0002,289,664
4May 22, 2024 17:2764,48446,012,55321,871,0001,988,0002,289,664
5May 22, 2024 17:2764,50051,339,46821,877,0001,988,0002,289,664
6May 22, 2024 17:2764,50850,712,90021,879,0001,989,0002,289,664
7May 22, 2024 17:2764,60854,022,44921,913,0001,992,0002,289,664
8May 22, 2024 17:2764,70346,666,30621,945,0001,995,0002,523,136
9May 22, 2024 17:2764,70555,332,62621,946,0001,995,0002,289,664
10May 22, 2024 17:2764,71445,957,40321,949,0001,995,0002,289,664
11May 22, 2024 17:2768,33084,476,66925,282,02302,277,376
12May 22, 2024 17:2768,57292,613,25425,371,62202,273,280
13May 22, 2024 17:2768,63890,817,77225,396,06602,273,280
14May 22, 2024 17:2768,72999,100,75225,429,85102,265,088
15May 22, 2024 17:2769,06195,182,18325,552,42102,265,088
16May 22, 2024 17:2773,68382,181,38527,262,62402,273,280