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 28, 2024 18:11Joad 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
1Nov 28, 2024 18:1000000Error: expected "429496484933 ", got "399431749493 "stderr
2Nov 28, 2024 18:1100000Error: expected "429496465968 ", got "412316617131 "stderr
3Nov 28, 2024 18:1100000Error: expected "429496453470 ", got "403726680737 "stderr
4Nov 28, 2024 18:1100000Error: expected "429496487844 ", got "416611600887 "stderr
5Nov 28, 2024 18:1159,50543,296,46221,017,0001,000,0002,428,928
6Nov 28, 2024 18:1159,54946,318,78021,032,0001,001,0002,433,024
7Nov 28, 2024 18:1159,62241,513,43420,055,0002,005,0002,437,120
8Nov 28, 2024 18:1159,63044,531,88621,061,0001,002,0002,514,944
9Nov 28, 2024 18:1159,70544,357,92120,083,0002,008,0002,416,640
10Nov 28, 2024 18:1159,70843,606,66321,088,0001,004,0002,269,184