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 listMay 26, 2024 23:35Joad NacerJoad NacerError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 26, 2024 23:3400000Error: expected "429496461196 ", got "403726688294 "
2May 26, 2024 23:3564,38949,786,04821,839,0001,985,0002,289,664
3May 26, 2024 23:3564,44156,768,39422,850,000993,0002,527,232
4May 26, 2024 23:3564,49253,454,52421,874,0001,988,0002,523,136
5May 26, 2024 23:3564,50358,445,72321,878,0001,988,0002,531,328
6May 26, 2024 23:3564,53049,453,92222,882,000994,0002,289,664
7May 26, 2024 23:3564,56550,394,04421,899,0001,990,0002,289,664
8May 26, 2024 23:3564,70846,942,76721,947,0001,995,0002,289,664
9May 26, 2024 23:3564,77846,707,92921,971,0001,997,0002,269,184
10May 26, 2024 23:3564,98950,168,04822,043,0002,003,0002,289,664
11May 26, 2024 23:3568,11085,952,29125,200,66802,396,160
12May 26, 2024 23:3568,566102,651,02825,369,27202,269,184
13May 26, 2024 23:3569,06594,623,76825,554,09502,277,376