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 listNov 15, 2023 20:46mmalczakmmalczakScore: 69,543Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 15, 2023 20:4669,00349,130,13825,531,00002,428,928
2Nov 15, 2023 20:4669,09249,030,76925,564,00002,428,928
3Nov 15, 2023 20:4669,12444,200,88425,576,00002,433,024
4Nov 15, 2023 20:4669,28451,483,35925,635,00002,433,024
5Nov 15, 2023 20:4669,39551,975,36324,649,0001,027,0002,535,424
6Nov 15, 2023 20:4669,41450,169,74725,683,00002,535,424
7Nov 15, 2023 20:4669,54352,759,17224,702,0001,029,0002,428,928
8Nov 15, 2023 20:4669,84947,044,43224,850,000994,0002,535,424
9Nov 15, 2023 20:4669,95756,158,29525,884,00002,535,424
10Nov 15, 2023 20:4672,53798,580,91326,838,86102,277,376
11Nov 15, 2023 20:4672,67183,759,98226,888,11202,277,376
12Nov 15, 2023 20:4672,706103,564,27726,901,11302,269,184