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 listAug 30, 2023 21:23Franek KortaFranek KortaError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 30, 2023 21:2900000Error: expected "429496556709 ", got "429496556035 "stderr
2Aug 30, 2023 21:2900000Error: expected "429496519878 ", got "429496515567 "stderr
3Aug 30, 2023 21:4864,92472,646,97324,021,99202,301,952
4Sep 2, 2023 21:0564,978104,379,45124,041,76402,301,952
5Aug 30, 2023 21:2365,07085,689,69624,075,86402,232,320
6Aug 30, 2023 21:3165,070110,204,38824,075,78602,297,856
7Sep 2, 2023 21:0565,11998,976,68424,094,02802,297,856
8Aug 30, 2023 21:3165,178100,110,30124,115,68502,289,664
9Sep 2, 2023 21:0565,26397,008,12024,147,47802,269,184
10Aug 30, 2023 21:2365,27766,345,87024,152,36902,301,952
11Aug 30, 2023 21:4865,37488,719,71124,188,51502,289,664
12Aug 30, 2023 21:2365,41982,988,44924,205,18402,179,072
13Aug 30, 2023 21:4865,47590,217,74824,225,68302,301,952
14Aug 30, 2023 21:3165,59596,551,54224,270,05302,183,168