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 listJun 16, 2024 07:50CemaCemaError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 16, 2024 07:4900000Error: expected "429496475892 ", got "549755408460 "
2Jun 16, 2024 07:50109,75966,358,16940,611,00002,523,136
3Jun 16, 2024 07:50110,41671,724,00639,858,000996,0002,265,088
4Jun 16, 2024 07:50110,47366,033,16838,882,0001,993,0002,269,184
5Jun 16, 2024 07:50110,57862,564,85938,919,0001,995,0002,269,184
6Jun 16, 2024 07:50110,93562,009,10939,044,0002,002,0002,265,088
7Jun 16, 2024 07:50111,34164,166,84640,192,0001,004,0002,289,664
8Jun 16, 2024 07:50111,70069,793,62040,321,0001,008,0002,289,664
9Jun 16, 2024 07:50111,95464,134,75540,413,0001,010,0002,371,584
10Jun 16, 2024 07:50111,959112,726,01141,424,67502,273,280
11Jun 16, 2024 07:50112,52769,921,05740,620,0001,015,0002,273,280
12Jun 16, 2024 07:50112,714107,839,00841,704,36402,408,448
13Jun 16, 2024 07:50114,646114,638,99942,418,88002,277,376