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 20:20Franek KortaFranek KortaScore: 74,659Success
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 20:2074,04948,533,04425,369,0002,029,0002,269,184
2Aug 6, 2022 20:2274,14649,434,01524,386,0003,048,0002,273,280
3Aug 6, 2022 20:2074,20053,438,11226,438,0001,016,0002,527,232
4Aug 6, 2022 20:2274,25953,844,04326,459,0001,017,0002,281,472
5Aug 6, 2022 20:2074,27048,874,54326,463,0001,017,0002,527,232
6Aug 6, 2022 20:2274,27649,818,78725,447,0002,035,0002,269,184
7Aug 6, 2022 20:2074,35149,351,18825,473,0002,037,0002,269,184
8Aug 6, 2022 20:2274,37350,062,87024,461,0003,057,0002,281,472
9Aug 6, 2022 20:2274,41153,566,00525,493,0002,039,0002,523,136
10Aug 6, 2022 20:2074,45950,677,35425,510,0002,040,0002,273,280
11Aug 6, 2022 20:2274,47053,173,58525,513,0002,041,0002,281,472
12Aug 6, 2022 20:2074,61652,685,73624,541,0003,067,0002,281,472
13Aug 6, 2022 20:2274,65958,080,82825,578,0002,046,0002,281,472
14Aug 6, 2022 20:2274,67854,867,63726,608,0001,023,0002,371,584
15Aug 6, 2022 20:2074,67852,886,27027,631,00002,285,568
16Aug 6, 2022 20:2274,68653,234,84827,634,00002,375,680
17Aug 6, 2022 20:2074,72454,935,80126,624,0001,024,0002,527,232
18Aug 6, 2022 20:2074,76854,098,58726,640,0001,024,0002,269,184
19Aug 6, 2022 20:2278,52889,467,90529,055,39302,269,184
20Aug 6, 2022 20:2078,59694,188,37929,080,41402,297,856
21Aug 6, 2022 20:2278,69591,768,53229,117,06602,248,704
22Aug 6, 2022 20:2078,70389,689,78229,119,98202,265,088
23Aug 6, 2022 20:2278,90095,645,35429,192,94902,256,896
24Aug 6, 2022 20:2078,93199,318,15029,204,53402,256,896