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 6, 2022 17:55Franek KortaFranek KortaScore: 78,530Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 6, 2022 17:5577,97055,956,30123,875,0004,974,0002,523,136
2Aug 6, 2022 18:1178,04358,662,37026,885,0001,991,0002,281,472
3Aug 6, 2022 18:1178,07650,751,13026,896,0001,992,0002,523,136
4Aug 6, 2022 17:5578,08453,271,74926,899,0001,992,0002,379,776
5Aug 6, 2022 18:1178,13853,303,30826,918,0001,993,0002,285,568
6Aug 6, 2022 18:1178,18955,535,37027,933,000997,0002,527,232
7Aug 6, 2022 17:5578,21149,652,27626,943,0001,995,0002,523,136
8Aug 6, 2022 17:5578,25456,168,43627,956,000998,0002,375,680
9Aug 6, 2022 18:1178,28457,227,85926,968,0001,997,0002,281,472
10Aug 6, 2022 17:5578,38457,403,86325,002,0004,000,0002,281,472
11Aug 6, 2022 18:1178,39556,195,99728,006,0001,000,0002,535,424
12Aug 6, 2022 18:1178,49754,252,09427,041,0002,003,0002,273,280
13Aug 6, 2022 17:5578,53055,327,76227,053,0002,003,0002,523,136
14Aug 6, 2022 17:5578,53854,295,90327,055,0002,004,0002,527,232
15Aug 6, 2022 18:1178,58153,807,56127,070,0002,005,0002,535,424
16Aug 6, 2022 17:5578,67353,594,05327,102,0002,007,0002,281,472
17Aug 6, 2022 17:5578,71956,683,56527,118,0002,008,0002,531,328
18Aug 6, 2022 18:1178,83052,279,41726,150,0003,017,0002,527,232
19Aug 6, 2022 17:5583,45498,376,81930,878,03902,273,280
20Aug 6, 2022 17:5583,572107,164,73830,921,72902,265,088
21Aug 6, 2022 18:1183,61294,761,23630,936,44202,252,800
22Aug 6, 2022 18:1183,71997,181,43130,975,99002,256,896
23Aug 6, 2022 18:1184,09894,609,62531,116,19502,265,088
24Aug 6, 2022 17:5584,168100,611,22831,141,98502,269,184