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:34Franek 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:3800000Error: expected "429496517845 ", got "429496516949 "stderr
2Aug 29, 2023 21:3100000Error: expected "429496538812 ", got "429496537586 "stderr
3Aug 29, 2023 21:3460,99743,462,16320,518,0002,051,0002,449,408
4Aug 29, 2023 21:3461,01452,505,21119,497,0003,078,0002,265,088
5Aug 29, 2023 21:3461,14646,777,74322,624,00002,441,216
6Aug 29, 2023 21:3461,22448,827,81322,653,00002,531,328
7Aug 29, 2023 21:3461,28148,636,21022,674,00002,531,328
8Aug 29, 2023 21:3461,35147,596,63522,700,00002,531,328
9Aug 29, 2023 21:3461,35947,601,83022,703,00002,269,184
10Aug 29, 2023 21:3461,75151,915,88021,855,000993,0002,531,328
11Aug 29, 2023 21:3461,81147,469,92720,882,0001,988,0002,445,312
12Aug 29, 2023 21:2364,87588,180,44624,003,64002,179,072
13Aug 29, 2023 21:3064,98992,340,57024,045,81502,174,976
14Aug 29, 2023 21:3565,02688,478,31324,059,59502,174,976
15Aug 29, 2023 21:3065,04991,304,07224,068,19002,174,976
16Aug 29, 2023 21:3565,07496,811,69524,077,52302,174,976
17Aug 29, 2023 21:2365,16186,493,37524,109,59902,289,664
18Aug 29, 2023 21:3465,16283,762,43024,110,11202,297,856
19Aug 29, 2023 21:3465,172106,628,02924,113,68402,174,976
20Aug 29, 2023 21:3065,211101,482,54624,128,05902,297,856
21Aug 29, 2023 21:2365,27395,694,41624,150,95202,297,856
22Aug 29, 2023 21:3565,40780,942,08224,200,64202,301,952
23Aug 29, 2023 21:3465,67096,621,79324,297,77702,170,880