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 listAug 29, 2023 11:25mmalczakmmalczakScore: 898,030Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 29, 2023 11:30663,104318,855,076245,348,39202,293,760
2Aug 29, 2023 11:33663,640304,381,586245,546,77702,179,072
3Aug 29, 2023 11:33664,417322,671,749245,834,27702,301,952
4Aug 29, 2023 11:30666,409318,458,498246,571,25102,301,952
5Aug 29, 2023 11:33667,921311,668,610247,130,94402,301,952
6Aug 29, 2023 11:30669,687309,147,631247,784,19702,301,952
7Aug 29, 2023 11:29705,171330,147,748260,913,16602,293,760
8Aug 29, 2023 11:29705,266320,428,951260,948,28202,293,760
9Aug 29, 2023 11:29705,337318,012,794260,974,66602,293,760
10Aug 29, 2023 11:28766,121352,763,852283,464,85302,297,856
11Aug 29, 2023 11:28768,669354,056,597284,407,63802,293,760
12Aug 29, 2023 11:28774,315365,415,667286,496,46802,297,856
13Aug 29, 2023 11:27898,030400,136,253332,271,25002,293,760
14Aug 29, 2023 11:27898,958399,365,714332,614,57402,289,664
15Aug 29, 2023 11:27902,337399,651,824333,864,70802,293,760
16Aug 29, 2023 11:271,172,211485,036,825433,718,25002,293,760
17Aug 29, 2023 11:271,173,512495,993,699434,199,32702,297,856
18Aug 29, 2023 11:271,175,880503,470,132435,075,73302,301,952
19Aug 29, 2023 11:261,733,648700,231,006641,449,61302,293,760
20Aug 29, 2023 11:261,750,233721,686,480647,586,33402,293,760
21Aug 29, 2023 11:261,761,433705,173,833651,730,29002,289,664
22Aug 29, 2023 11:252,901,6491,132,120,6121,073,610,04102,293,760
23Aug 29, 2023 11:252,937,0741,140,149,0141,086,717,24602,297,856
24Aug 29, 2023 11:252,947,6021,162,307,7321,090,612,85902,174,976