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 10:31mmalczakmmalczakScore: 116,195Success
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 10:24109,099104,514,58240,366,68902,260,992
2Sep 16, 2023 10:31109,255109,709,86440,424,45702,265,088
3Sep 16, 2023 10:24109,443114,287,21940,493,87802,269,184
4Sep 16, 2023 10:31109,622105,521,99740,560,10302,277,376
5Sep 16, 2023 10:31110,505110,794,40440,886,71802,265,088
6Sep 16, 2023 10:24110,533108,353,39040,897,09702,269,184
7Sep 16, 2023 10:24114,48461,734,37040,342,0002,017,0002,269,184
8Sep 16, 2023 10:24115,86872,516,92641,874,000997,0002,289,664
9Sep 16, 2023 10:31115,87863,078,64540,881,0001,994,0002,527,232
10Sep 16, 2023 10:24116,04174,605,08640,938,0001,997,0002,265,088
11Sep 16, 2023 10:24116,07066,468,56540,949,0001,997,0002,289,664
12Sep 16, 2023 10:31116,16571,710,65841,982,000999,0002,269,184
13Sep 16, 2023 10:24116,19566,290,50341,993,000999,0002,289,664
14Sep 16, 2023 10:31116,21665,630,59541,000,0002,000,0002,289,664
15Sep 16, 2023 10:31116,23069,187,65441,005,0002,000,0002,289,664
16Sep 16, 2023 10:31116,35966,458,63242,052,0001,001,0002,273,280
17Sep 16, 2023 10:24116,55971,473,93141,122,0002,005,0002,289,664
18Sep 16, 2023 10:24116,64368,833,85741,151,0002,007,0002,289,664
19Sep 16, 2023 10:31116,78965,117,90041,203,0002,009,0002,289,664
20Sep 16, 2023 10:31116,90867,818,00542,251,0001,005,0002,289,664
21Sep 16, 2023 10:31116,97373,817,96541,267,0002,013,0002,523,136
22Sep 16, 2023 10:31117,03862,937,90641,290,0002,014,0002,269,184
23Sep 16, 2023 10:24117,40565,839,21242,430,0001,010,0002,289,664
24Sep 16, 2023 10:24117,49767,824,18742,463,0001,011,0002,289,664