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 listMay 7, 2024 00:58Joad 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
1May 7, 2024 00:5800000Error: No answer to stdout. Died or killed?
2May 7, 2024 00:5800000Error: expected "429496473534 ", got "412316624218 "
3May 7, 2024 00:5867,65150,321,89723,029,0002,002,0002,269,184
4May 7, 2024 00:5867,91647,734,87923,119,0002,010,0002,289,664
5May 7, 2024 00:5867,96548,444,57823,136,0002,011,0002,289,664
6May 7, 2024 00:5867,99550,093,18123,146,0002,012,0002,289,664
7May 7, 2024 00:5868,01448,060,26323,152,0002,013,0002,289,664
8May 7, 2024 00:5868,06553,637,79723,170,0002,014,0002,273,280
9May 7, 2024 00:5868,21647,633,11924,231,0001,009,0002,289,664
10May 7, 2024 00:5868,30548,772,06823,252,0002,021,0002,289,664
11May 7, 2024 00:5870,47295,032,78426,074,58602,273,280
12May 7, 2024 00:5870,49593,479,36226,082,96502,273,280
13May 7, 2024 00:5870,72890,898,10126,169,46702,260,992
14May 7, 2024 00:5872,68152,561,69424,900,0001,992,0002,273,280