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 listJul 27, 2024 17:40Matthew SillsMatthew SillsScore: 110,370Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 27, 2024 17:40109,07364,807,68640,357,00002,273,280
2Jul 27, 2024 17:40109,35171,534,07540,460,00002,523,136
3Jul 27, 2024 17:40109,44368,224,62839,482,0001,012,0002,289,664
4Jul 27, 2024 17:40109,64968,192,11239,556,0001,014,0002,289,664
5Jul 27, 2024 17:40109,66570,452,65040,576,00002,371,584
6Jul 27, 2024 17:40109,66865,047,07339,563,0001,014,0002,289,664
7Jul 27, 2024 17:40110,37065,075,82738,845,0001,992,0002,289,664
8Jul 27, 2024 17:40110,38172,998,21538,849,0001,992,0002,289,664
9Jul 27, 2024 17:40110,41666,860,60738,862,0001,992,0002,289,664
10Jul 27, 2024 17:40111,709102,384,67241,332,33202,281,472
11Jul 27, 2024 17:40112,526125,249,52541,634,50302,273,280
12Jul 27, 2024 17:40112,864110,611,40141,759,78402,269,184