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 listApr 9, 2023 16:03Franek KortaFranek KortaScore: 118,816Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 9, 2023 16:03117,35766,933,42543,422,00002,527,232
2Apr 9, 2023 16:03118,01168,927,03743,664,00002,265,088
3Apr 9, 2023 16:03118,48671,246,37042,844,000996,0002,441,216
4Apr 9, 2023 16:03118,68675,544,63642,916,000998,0002,269,184
5Apr 9, 2023 16:03118,70063,347,98442,921,000998,0002,527,232
6Apr 9, 2023 16:03118,77368,842,86442,948,000998,0002,269,184
7Apr 9, 2023 16:03118,81661,194,72342,963,000999,0002,269,184
8Apr 9, 2023 16:03119,14367,809,83043,082,0001,001,0002,531,328
9Apr 9, 2023 16:03119,87668,659,16844,354,00002,527,232
10Apr 9, 2023 16:03123,608110,697,22345,735,11302,301,952
11Apr 9, 2023 16:03123,76696,780,47445,793,45602,183,168
12Apr 9, 2023 16:03124,505114,249,94746,066,95402,170,880