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 27, 2024 00:03Joad 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 27, 2024 00:0100000Error: expected "429496409224 ", got "380104412745 "
2May 27, 2024 00:0364,82246,447,08322,985,000999,0002,527,232
3May 27, 2024 00:0364,85149,613,58722,996,000999,0002,527,232
4May 27, 2024 00:0364,93246,354,36822,023,0002,002,0002,273,280
5May 27, 2024 00:0365,00552,328,12422,048,0002,004,0002,289,664
6May 27, 2024 00:0365,01646,740,93822,052,0002,004,0002,375,680
7May 27, 2024 00:0365,30550,739,47023,157,0001,006,0002,523,136
8May 27, 2024 00:0365,33246,899,16322,159,0002,014,0002,523,136
9May 27, 2024 00:0365,33546,999,79922,160,0002,014,0002,289,664
10May 27, 2024 00:0365,45449,229,02922,200,0002,018,0002,265,088
11May 27, 2024 00:0368,81785,341,40225,462,28902,260,992
12May 27, 2024 00:0368,86685,318,02425,480,54802,277,376
13May 27, 2024 00:0369,08990,771,17325,562,83602,273,280