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 18:13Yuriy LyfenkoYuriy LyfenkoError
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 18:1200000Error: expected "429496427463 ", got "429496427983 "stderr
2Jul 13, 2021 18:1364,224550,253,77221,783,0001,980,0002,281,472
3Jul 13, 2021 18:1364,295551,548,99821,807,0001,982,0002,281,472
4Jul 13, 2021 18:1364,359542,807,36321,829,0001,984,0002,281,472
5Jul 13, 2021 18:1364,411546,117,64521,846,0001,986,0002,285,568
6Jul 13, 2021 18:1364,468549,446,10121,866,0001,987,0002,281,472
7Jul 13, 2021 18:1364,643547,013,72621,925,0001,993,0002,281,472
8Jul 13, 2021 18:1364,730546,866,28821,955,0001,995,0002,527,232
9Jul 13, 2021 18:1364,776546,594,55621,970,0001,997,0002,359,296
10Jul 13, 2021 18:1364,795547,889,16520,978,0002,996,0002,281,472
11Jul 13, 2021 18:1367,364578,860,21824,924,51402,248,704
12Jul 13, 2021 18:1367,369589,005,02924,926,61402,260,992
13Jul 13, 2021 18:1367,643588,265,42025,027,89402,256,896