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 16, 2023 16:07mmalczakmmalczakScore: 98,889Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 16, 2023 16:0797,31662,885,23835,007,0001,000,0002,289,664
2Sep 16, 2023 16:0797,62761,935,89635,119,0001,003,0002,277,376
3Sep 16, 2023 16:0797,69757,790,54434,140,0002,008,0002,273,280
4Sep 16, 2023 16:0798,55457,716,63435,453,0001,012,0002,289,664
5Sep 16, 2023 16:0798,74660,775,93736,536,00002,531,328
6Sep 16, 2023 16:0798,78658,505,98635,536,0001,015,0002,277,376
7Sep 16, 2023 16:0798,88962,404,99235,573,0001,016,0002,277,376
8Sep 16, 2023 16:0799,03865,044,14535,627,0001,017,0002,289,664
9Sep 16, 2023 16:0799,60066,727,79934,860,0001,992,0002,289,664
10Sep 16, 2023 16:0799,666101,591,94936,876,55902,269,184
11Sep 16, 2023 16:07100,29599,248,69937,109,29002,265,088
12Sep 16, 2023 16:07100,31793,363,21537,117,35702,265,088