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 listJan 19, 2025 06:57Ian MckibbenIan MckibbenError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jan 19, 2025 07:1200000Error: expected "429496493189 ", got "429496487558"stderr
2Jan 19, 2025 06:5775,31458,357,78426,871,000995,0002,428,928
3Jan 19, 2025 06:5775,37857,622,69626,894,000996,0002,269,184
4Jan 19, 2025 06:5775,42459,530,44526,911,000996,0002,428,928
5Jan 19, 2025 06:5775,45952,562,33525,926,0001,994,0002,531,328
6Jan 19, 2025 06:5775,47048,507,04426,927,000997,0002,433,024
7Jan 19, 2025 06:5775,62449,545,11726,982,000999,0002,531,328
8Jan 19, 2025 06:5775,78647,170,36327,040,0001,001,0002,428,928
9Jan 19, 2025 06:5775,86848,643,91427,069,0001,002,0002,437,120
10Jan 19, 2025 06:5775,91651,053,42227,086,0001,003,0002,433,024