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:49Joad NacerJoad NacerScore: 66,019Success
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:4965,51449,366,02223,230,0001,010,0002,265,088
2May 26, 2024 23:4965,65949,865,34522,270,0002,024,0002,523,136
3May 26, 2024 23:4965,66244,808,07323,283,0001,012,0002,527,232
4May 26, 2024 23:4965,80851,104,15124,349,00002,265,088
5May 26, 2024 23:4965,81652,135,79522,323,0002,029,0002,289,664
6May 26, 2024 23:4966,00347,083,69623,404,0001,017,0002,289,664
7May 26, 2024 23:4966,01944,895,92423,410,0001,017,0002,519,040
8May 26, 2024 23:4966,20551,677,39923,476,0001,020,0002,527,232
9May 26, 2024 23:4966,51647,582,68423,586,0001,025,0002,273,280
10May 26, 2024 23:4969,58991,469,97525,748,02602,277,376
11May 26, 2024 23:4969,66584,227,93725,775,99802,269,184
12May 26, 2024 23:4970,35289,098,24626,030,40702,265,088