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 listJul 13, 2021 11:20Andrey TsvetkovAndrey TsvetkovScore: 103,114Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 13, 2021 11:20101,58657,792,93336,572,0001,015,0002,514,944
2Jul 13, 2021 11:20101,65967,402,09436,598,0001,016,0002,334,720
3Jul 13, 2021 11:20101,70363,333,82435,596,0002,034,0002,527,232
4Jul 13, 2021 11:20102,27865,874,26736,848,000995,0002,334,720
5Jul 13, 2021 11:20102,32768,532,24034,872,0002,989,0002,523,136
6Jul 13, 2021 11:20102,35472,551,02236,848,0001,023,0002,334,720
7Jul 13, 2021 11:20103,11466,005,15135,140,0003,012,0002,527,232
8Jul 13, 2021 11:20103,25162,928,42836,193,0002,010,0002,334,720
9Jul 13, 2021 11:20103,666102,248,00638,356,50502,199,552
10Jul 13, 2021 11:20104,259113,357,24138,575,88702,199,552
11Jul 13, 2021 11:20104,364122,391,14438,614,70402,195,456
12Jul 13, 2021 11:20107,70864,424,19237,860,0001,992,0002,531,328