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 listJun 8, 2024 13:50Joad NacerJoad NacerError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 8, 2024 13:4900000Error: expected "429496446484 ", got "395136749234 "
2Jun 8, 2024 13:5064,71650,915,57422,948,000997,0002,277,376
3Jun 8, 2024 13:5064,78651,805,76121,974,0001,997,0002,289,664
4Jun 8, 2024 13:5065,00851,546,40322,049,0002,004,0002,265,088
5Jun 8, 2024 13:5065,13548,072,59622,092,0002,008,0002,289,664
6Jun 8, 2024 13:5065,23249,134,37322,125,0002,011,0002,289,664
7Jun 8, 2024 13:5065,26847,338,99522,137,0002,012,0002,289,664
8Jun 8, 2024 13:5065,30548,620,90022,150,0002,013,0002,289,664
9Jun 8, 2024 13:5065,31447,006,15724,166,00002,289,664
10Jun 8, 2024 13:5065,49547,334,33422,214,0002,019,0002,289,664
11Jun 8, 2024 13:5069,32691,336,94025,650,65502,252,800
12Jun 8, 2024 13:5069,416108,041,12825,684,01302,277,376
13Jun 8, 2024 13:5069,78992,735,07325,822,07202,277,376