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 28, 2023 21:00Franek 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 28, 2023 20:5800000Error: expected "429496491709 ", got "429496490624 "stderr
2Aug 28, 2023 21:0074,21450,858,29727,459,00002,519,040
3Aug 28, 2023 21:0074,23049,103,01226,448,0001,017,0002,514,944
4Aug 28, 2023 21:0074,45958,656,74927,550,00002,424,832
5Aug 28, 2023 21:0074,46551,189,11124,491,0003,061,0002,424,832
6Aug 28, 2023 21:0074,56553,912,51826,568,0001,021,0002,416,640
7Aug 28, 2023 21:0074,72456,240,72826,624,0001,024,0002,514,944
8Aug 28, 2023 21:0075,25454,128,83325,856,0001,988,0002,424,832
9Aug 28, 2023 21:0075,26554,674,57627,848,00002,519,040
10Aug 28, 2023 21:0075,28451,834,18625,866,0001,989,0002,424,832
11Aug 28, 2023 21:0078,68091,163,64529,111,50702,273,280
12Aug 28, 2023 21:0079,21793,874,17129,310,24502,256,896
13Aug 28, 2023 21:0079,57096,508,35129,440,92202,281,472