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 11, 2025 21:57Drew GarciaDrew GarciaError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 11, 2025 21:5000000Error: expected "429496600985 ", got "429496600341 "
2Apr 11, 2025 21:57116,55173,077,04642,122,0001,002,0002,281,472
3Apr 11, 2025 21:57118,74370,553,99240,940,0002,995,0002,273,280
4Apr 11, 2025 21:57119,07375,863,11443,056,0001,001,0002,281,472
5Apr 11, 2025 21:57119,78968,623,92142,308,0002,014,0002,281,472
6Apr 11, 2025 21:57120,55469,817,18743,592,0001,013,0002,281,472
7Apr 11, 2025 21:57121,28970,726,19242,838,0002,039,0002,269,184
8Apr 11, 2025 21:57122,42273,410,67444,290,0001,006,0002,269,184
9Apr 11, 2025 21:57122,54170,407,63643,325,0002,015,0002,281,472
10Apr 11, 2025 21:57123,17882,421,78745,576,00002,281,472