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 listSep 2, 2023 22:39Franek 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
1Sep 2, 2023 22:3300000Error: expected "429496425489 ", got "386546812798"stderr
2Sep 2, 2023 22:3800000Error: expected "429496528424 ", got "429496525186"stderr
3Sep 2, 2023 22:3960,93047,240,54520,495,0002,049,0002,531,328
4Sep 2, 2023 22:3960,94947,862,20621,526,0001,025,0002,441,216
5Sep 2, 2023 22:3961,01943,747,26721,551,0001,026,0002,531,328
6Sep 2, 2023 22:3961,06551,460,34321,567,0001,027,0002,437,120
7Sep 2, 2023 22:3961,11947,588,64921,587,0001,027,0002,269,184
8Sep 2, 2023 22:3961,14354,635,60222,623,00002,531,328
9Sep 2, 2023 22:3961,19549,531,47721,613,0001,029,0002,531,328
10Sep 2, 2023 22:3961,25946,694,58722,666,00002,531,328
11Sep 2, 2023 22:3961,80049,078,50820,878,0001,988,0002,269,184
12Sep 2, 2023 22:3964,91578,142,58324,018,65902,285,568
13Sep 2, 2023 22:3964,96992,693,24124,038,40702,289,664
14Sep 2, 2023 22:3965,28793,525,33424,156,10802,297,856