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 18:24Franek KortaFranek KortaScore: 78,181Success
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 18:2477,84357,312,87126,816,0001,986,0002,281,472
2Aug 6, 2022 18:1777,93055,673,98326,846,0001,988,0002,281,472
3Aug 6, 2022 18:1777,96254,831,88126,857,0001,989,0002,531,328
4Aug 6, 2022 18:2477,96559,825,80526,858,0001,989,0002,281,472
5Aug 6, 2022 18:2477,98155,621,63625,869,0002,984,0002,269,184
6Aug 6, 2022 18:1777,99554,890,40927,863,000995,0002,281,472
7Aug 6, 2022 18:2477,99758,982,40025,874,0002,985,0002,281,472
8Aug 6, 2022 18:1778,05955,898,60124,899,0003,983,0002,281,472
9Aug 6, 2022 18:1778,07655,801,09625,900,0002,988,0002,281,472
10Aug 6, 2022 18:1778,08453,634,38827,895,000996,0002,269,184
11Aug 6, 2022 18:2478,09757,338,57026,904,0001,992,0002,367,488
12Aug 6, 2022 18:1778,11155,665,65526,908,0001,993,0002,281,472
13Aug 6, 2022 18:2478,18154,123,91727,930,000997,0002,281,472
14Aug 6, 2022 18:2478,22456,334,06327,945,000998,0002,281,472
15Aug 6, 2022 18:1778,27054,613,74626,963,0001,997,0002,281,472
16Aug 6, 2022 18:2478,41157,300,89226,011,0003,001,0002,281,472
17Aug 6, 2022 18:2478,46256,186,26927,029,0002,002,0002,281,472
18Aug 6, 2022 18:1778,48656,697,22327,038,0002,002,0002,527,232
19Aug 6, 2022 18:1784,19999,635,36631,153,79402,281,472
20Aug 6, 2022 18:2484,29997,209,01631,190,55002,265,088
21Aug 6, 2022 18:1784,575101,267,50131,292,89802,265,088
22Aug 6, 2022 18:2484,82496,623,60031,384,98002,260,992
23Aug 6, 2022 18:1785,010103,113,58231,453,71802,265,088
24Aug 6, 2022 18:2485,157107,540,13231,507,92502,265,088