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 3, 2022 18:55Franek KortaFranek KortaScore: 101,464Success
Source Code

Source code access is restricted. Log in to request access.

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 3, 2022 18:5597,90565,008,26434,213,0002,012,0002,523,136
2Aug 3, 2022 18:5599,71160,514,91034,899,0001,994,0002,281,472
3Aug 3, 2022 18:5599,97661,697,99234,936,0002,055,0002,523,136
4Aug 3, 2022 18:55100,18964,862,24136,069,0001,001,0002,281,472
5Aug 3, 2022 18:55100,91161,387,17436,328,0001,009,0002,281,472
6Aug 3, 2022 18:55101,404106,121,43837,519,40602,265,088
7Aug 3, 2022 18:55101,464112,087,76637,541,76402,220,032
8Aug 3, 2022 18:55101,723105,388,42437,637,32802,228,224
9Aug 3, 2022 18:55102,14369,247,31535,804,0001,989,0002,281,472
10Aug 3, 2022 18:55102,21473,633,60136,824,000995,0002,281,472
11Aug 3, 2022 18:55102,25968,284,48035,845,0001,991,0002,523,136
12Aug 3, 2022 18:55102,80560,233,98136,036,0002,002,0002,367,488