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:22Franek 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:2200000Error: expected "429496457900 ", got "416611573285 "stderr
2Aug 29, 2023 21:2260,94139,700,60922,548,00002,265,088
3Aug 29, 2023 21:2260,94943,780,70422,551,00002,531,328
4Aug 29, 2023 21:2261,03551,002,08422,583,00002,441,216
5Aug 29, 2023 21:2261,06846,301,85822,595,00002,437,120
6Aug 29, 2023 21:2261,15748,704,46722,628,00002,531,328
7Aug 29, 2023 21:2261,17646,665,80520,578,0002,057,0002,437,120
8Aug 29, 2023 21:2261,32252,856,66122,689,00002,445,312
9Aug 29, 2023 21:2261,34649,728,90621,667,0001,031,0002,265,088
10Aug 29, 2023 21:2261,35746,854,60222,702,00002,531,328
11Aug 29, 2023 21:2265,428104,596,49024,208,20002,301,952
12Aug 29, 2023 21:2265,56693,975,05524,259,31802,293,760
13Aug 29, 2023 21:2265,78987,170,86024,341,86802,228,224