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 listJul 24, 2024 08:36DanielDanielScore: 108,316Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 24, 2024 08:36107,07870,208,80438,604,0001,015,0002,379,776
2Jul 24, 2024 08:36107,20867,059,71838,650,0001,017,0002,289,664
3Jul 24, 2024 08:36107,23864,340,22538,661,0001,017,0002,367,488
4Jul 24, 2024 08:36107,33269,652,03739,713,00002,289,664
5Jul 24, 2024 08:36107,66865,681,45838,842,000995,0002,375,680
6Jul 24, 2024 08:36107,70064,275,80538,853,000996,0002,289,664
7Jul 24, 2024 08:36108,31666,549,16038,074,0002,003,0002,281,472
8Jul 24, 2024 08:36108,34663,666,25838,084,0002,004,0002,367,488
9Jul 24, 2024 08:36108,35168,020,20838,086,0002,004,0002,371,584
10Jul 24, 2024 08:36110,817101,585,56141,002,34702,347,008
11Jul 24, 2024 08:36110,968116,890,15641,058,11102,334,720
12Jul 24, 2024 08:36111,681109,761,60141,321,94302,203,648