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 23, 2024 07:29Maxim ElchuginMaxim ElchuginScore: 109,516Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 23, 2024 07:29108,15163,455,49039,016,0001,000,0002,281,472
2May 23, 2024 07:29108,26860,781,67539,058,0001,001,0002,510,848
3May 23, 2024 07:29108,55763,693,90238,158,0002,008,0002,289,664
4May 23, 2024 07:29108,65762,360,95638,193,0002,010,0002,281,472
5May 23, 2024 07:29108,81964,079,48439,257,0001,006,0002,519,040
6May 23, 2024 07:29109,50566,025,64840,517,00002,281,472
7May 23, 2024 07:29109,51666,287,44838,495,0002,026,0002,281,472
8May 23, 2024 07:29109,84165,618,83939,625,0001,016,0002,502,656
9May 23, 2024 07:29110,71463,751,57737,967,0002,997,0002,506,752
10May 23, 2024 07:29111,597111,131,62741,290,80102,228,224
11May 23, 2024 07:29113,142114,042,22041,862,65002,240,512
12May 23, 2024 07:29114,056114,377,25842,200,86002,232,320