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 listApr 23, 2026 06:13Charles CabergsCharles CabergsError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 26, 2026 16:46014,710,95302,018,0002,535,424expected "429496504214 ", got "probe=stdout-runtime-041;cwd=/root;argc=1;argv0=/main;fd0=/mnt/hldata/data459527105;fd0stat=mode=100600,size=400000000,dev=34,ino=39520;fd1=/mnt/hldata/got3636098093;fd1stat=mode=100600,size=0,dev=34,ino=39526;fd2=pipe:[7...
2Apr 26, 2026 16:46021,297,51602,122,0002,527,232expected "429496486202 ", got "probe=stdout-runtime-041;cwd=/root;argc=1;argv0=/main;fd0=/mnt/hldata/data1867568537;fd0stat=mode=100600,size=400000000,dev=34,ino=39521;fd1=/mnt/hldata/got939362940;fd1stat=mode=100600,size=0,dev=34,ino=39527;fd2=pipe:[7...
3Apr 26, 2026 16:46020,932,96702,028,0002,535,424expected "429496491595 ", got "probe=stdout-runtime-041;cwd=/root;argc=1;argv0=/main;fd0=/mnt/hldata/data3843498413;fd0stat=mode=100600,size=400000000,dev=34,ino=39522;fd1=/mnt/hldata/got2674197054;fd1stat=mode=100600,size=0,dev=34,ino=39528;fd2=pipe:[...