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 13, 2021 11:14Andrey TsvetkovAndrey TsvetkovScore: 95,149Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 13, 2021 11:1494,42763,016,93531,944,0002,994,0002,527,232
2Jul 13, 2021 11:1494,68460,035,89233,032,0002,001,0002,387,968
3Jul 13, 2021 11:1494,80859,970,54832,073,0003,006,0002,514,944
4Jul 13, 2021 11:1494,87863,082,22032,096,0003,009,0002,527,232
5Jul 13, 2021 11:1494,93260,032,18232,115,0003,010,0002,514,944
6Jul 13, 2021 11:1495,13560,493,31333,189,0002,011,0002,330,624
7Jul 13, 2021 11:1495,14959,832,74832,188,0003,017,0002,334,720
8Jul 13, 2021 11:1495,21960,752,77932,212,0003,019,0002,334,720
9Jul 13, 2021 11:1495,27659,189,22833,238,0002,014,0002,334,720
10Jul 13, 2021 11:1498,159110,011,93136,319,00202,195,456
11Jul 13, 2021 11:1498,36499,598,19436,394,71002,207,744
12Jul 13, 2021 11:1498,844103,791,53136,572,14002,203,648