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:46Franek KortaFranek KortaScore: 61,792Success
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:4661,36553,825,60222,705,00002,519,040
2Sep 2, 2023 21:4661,41449,010,16922,723,00002,387,968
3Sep 2, 2023 21:4661,64649,181,86820,826,0001,983,0002,523,136
4Sep 2, 2023 21:4661,76545,880,43520,866,0001,987,0002,519,040
5Sep 2, 2023 21:4661,77651,584,79722,857,00002,519,040
6Sep 2, 2023 21:4661,78449,957,97921,867,000993,0002,519,040
7Sep 2, 2023 21:4661,79251,889,97819,881,0002,982,0002,387,968
8Sep 2, 2023 21:4661,79248,846,86620,875,0001,988,0002,519,040
9Sep 2, 2023 21:4661,83848,253,54020,891,0001,989,0002,392,064
10Sep 2, 2023 21:4665,313103,629,32024,165,86002,248,704
11Sep 2, 2023 21:4665,43088,027,27924,209,12302,220,032
12Sep 2, 2023 21:4665,59195,590,05424,268,53502,244,608