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 listSep 22, 2023 21:59mmalczakmmalczakScore: 74,638Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 22, 2023 21:5973,89250,639,48625,315,0002,025,0002,289,664
2Sep 22, 2023 21:5974,09249,686,00326,399,0001,015,0002,277,376
3Sep 22, 2023 21:5974,11656,875,88027,423,00002,289,664
4Sep 22, 2023 21:5974,17049,342,06425,411,0002,032,0002,289,664
5Sep 22, 2023 21:5974,21450,698,58526,442,0001,017,0002,277,376
6Sep 22, 2023 21:5974,36250,421,40826,495,0001,019,0002,289,664
7Sep 22, 2023 21:5974,63853,281,98126,594,0001,022,0002,273,280
8Sep 22, 2023 21:5975,05156,352,04226,778,000991,0002,527,232
9Sep 22, 2023 21:5975,70552,102,51826,011,0002,000,0002,289,664
10Sep 22, 2023 21:5977,06497,315,15528,513,79002,269,184
11Sep 22, 2023 21:5977,08994,168,10428,522,82802,260,992
12Sep 22, 2023 21:5977,38998,371,54828,633,79502,265,088