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 listApr 9, 2023 16:04Franek KortaFranek KortaScore: 127,732Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 9, 2023 16:04108,746100,517,32040,235,85402,170,880
2Apr 9, 2023 16:04109,135104,922,27740,380,01202,179,072
3Apr 9, 2023 16:04110,459114,546,08340,869,96002,297,856
4Apr 9, 2023 16:04126,58975,219,44244,845,0001,993,0002,441,216
5Apr 9, 2023 16:04127,45173,548,29946,154,0001,003,0002,449,408
6Apr 9, 2023 16:04127,68172,788,53044,227,0003,015,0002,269,184
7Apr 9, 2023 16:04127,73283,513,47247,261,00002,437,120
8Apr 9, 2023 16:04128,06874,836,08347,385,00002,445,312
9Apr 9, 2023 16:04128,10368,603,25547,398,00002,445,312
10Apr 9, 2023 16:04128,39272,120,54647,505,00002,269,184
11Apr 9, 2023 16:04128,48469,916,75747,539,00002,269,184
12Apr 9, 2023 16:04128,66872,706,75047,607,00002,265,088