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 23:13Joad 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 23:1300000Error: expected "429496467928 ", got "416611580999 "
2May 7, 2024 23:1364,02249,776,75222,659,0001,029,0002,289,664
3May 7, 2024 23:1364,05444,809,62623,700,00002,269,184
4May 7, 2024 23:1364,11150,137,10922,690,0001,031,0002,523,136
5May 7, 2024 23:1364,38653,174,49922,831,000992,0002,289,664
6May 7, 2024 23:1364,42454,705,81522,844,000993,0002,273,280
7May 7, 2024 23:1364,48952,011,81721,873,0001,988,0002,289,664
8May 7, 2024 23:1364,53553,252,79021,889,0001,989,0002,277,376
9May 7, 2024 23:1364,69246,024,28222,939,000997,0002,289,664
10May 7, 2024 23:1364,70552,212,52321,946,0001,995,0002,269,184
11May 7, 2024 23:1368,41586,148,94825,313,47302,281,472
12May 7, 2024 23:1468,54794,095,44225,362,24102,269,184
13May 7, 2024 23:1468,68487,874,91025,413,15602,269,184
14May 7, 2024 23:1468,83484,744,53425,468,42602,256,896
15May 7, 2024 23:1369,00787,718,66825,532,73002,281,472
16May 7, 2024 23:1369,08296,796,19425,560,51002,265,088