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 21:55Franek 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 21:5300000Error: expected "429496538388 ", got "429496534977 "stderr
2Sep 2, 2023 21:5300000Error: expected "429496565607 ", got "429496562644 "stderr
3Sep 2, 2023 21:5400000Error: expected "429496495506 ", got "429496493770 "stderr
4Sep 2, 2023 21:5561,20547,019,11522,646,00002,527,232
5Sep 2, 2023 21:5561,24951,190,65922,662,00002,269,184
6Sep 2, 2023 21:5561,25745,011,86722,665,00002,527,232
7Sep 2, 2023 21:5561,29248,475,88921,648,0001,030,0002,269,184
8Sep 2, 2023 21:5561,35153,542,73421,669,0001,031,0002,535,424
9Sep 2, 2023 21:5561,37051,131,48121,675,0001,032,0002,531,328
10Sep 2, 2023 21:5561,61645,798,31821,807,000991,0002,531,328
11Sep 2, 2023 21:5561,78948,706,84621,868,000994,0002,441,216
12Sep 2, 2023 21:5561,79550,973,10921,870,000994,0002,441,216
13Sep 2, 2023 21:5565,200103,324,09924,123,98702,228,224
14Sep 2, 2023 21:5565,52792,046,24824,244,85902,297,856
15Sep 2, 2023 21:5565,58685,163,62024,266,77902,297,856