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 29, 2023 21:25Franek 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 29, 2023 21:2500000Error: expected "429496516832 ", got "429496509925 "stderr
2Aug 29, 2023 21:2561,17845,376,09920,579,0002,057,0002,441,216
3Aug 29, 2023 21:2561,18947,919,78822,640,00002,269,184
4Aug 29, 2023 21:2561,29751,188,45419,588,0003,092,0002,445,312
5Aug 29, 2023 21:2561,31453,677,00822,686,00002,531,328
6Aug 29, 2023 21:2561,32451,466,88922,690,00002,449,408
7Aug 29, 2023 21:2561,76849,836,66822,854,00002,531,328
8Aug 29, 2023 21:2561,77347,240,00421,863,000993,0002,437,120
9Aug 29, 2023 21:2561,78145,967,77021,866,000993,0002,441,216
10Aug 29, 2023 21:2561,78149,483,44821,866,000993,0002,531,328
11Aug 29, 2023 21:2565,17790,595,50724,115,56302,289,664
12Aug 29, 2023 21:2565,409108,223,44724,201,22102,183,168
13Aug 29, 2023 21:2565,50783,251,50624,237,44102,301,952