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 21:26Franek KortaFranek KortaScore: 74,143Success
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 21:1973,45454,384,09526,172,0001,006,0002,277,376
2Aug 6, 2022 21:2673,47654,047,04325,173,0002,013,0002,277,376
3Aug 6, 2022 21:1973,56253,814,50725,202,0002,016,0002,269,184
4Aug 6, 2022 21:2673,65450,746,16625,234,0002,018,0002,273,280
5Aug 6, 2022 21:1973,67053,849,99523,220,0004,038,0002,277,376
6Aug 6, 2022 21:2673,67848,822,71123,223,0004,038,0002,523,136
7Aug 6, 2022 21:1973,93852,147,99726,344,0001,013,0002,281,472
8Aug 6, 2022 21:1973,95957,104,88725,338,0002,027,0002,519,040
9Aug 6, 2022 21:2673,97059,409,81026,356,0001,013,0002,277,376
10Aug 6, 2022 21:2673,97651,391,17424,330,0003,041,0002,277,376
11Aug 6, 2022 21:2674,03247,358,23125,363,0002,029,0002,371,584
12Aug 6, 2022 21:1974,14147,616,43625,400,0002,032,0002,273,280
13Aug 6, 2022 21:1974,14350,286,44426,417,0001,016,0002,269,184
14Aug 6, 2022 21:2674,15949,464,14824,391,0003,048,0002,277,376
15Aug 6, 2022 21:1974,22453,988,25126,446,0001,017,0002,531,328
16Aug 6, 2022 21:2674,27851,343,14524,430,0003,053,0002,277,376
17Aug 6, 2022 21:1974,28949,317,40026,469,0001,018,0002,527,232
18Aug 6, 2022 21:2674,42454,029,08925,498,0002,039,0002,265,088
19Aug 6, 2022 21:1977,93094,836,17728,834,07602,265,088
20Aug 6, 2022 21:1978,04599,070,80328,876,83402,273,280
21Aug 6, 2022 21:2678,21488,165,43428,939,01202,265,088
22Aug 6, 2022 21:2678,416103,199,31729,014,03402,256,896
23Aug 6, 2022 21:1978,65799,503,98029,102,97102,260,992
24Aug 6, 2022 21:2678,71184,283,65729,123,18502,269,184