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 28, 2024 13:47Joad NacerJoad NacerError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 28, 2024 13:4700000Error: expected "429496462966 ", got "4294966318 0 4294966263 1 4294966102 2 4294965550 3 4294964869 4 4294964848 5 4294963202 6 4294963098 7 4294962629 8 4294962603 9 4294962341 10 4294962135 11 4294961871 12 4294961546 13 4294960975 14 4294960683 15 ...