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 listDec 12, 2024 20:04Joad 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
1Nov 29, 2024 18:4200000Error: expected "429496478232 ", got "382251894903 "stderr
2Nov 29, 2024 18:4400000Error: expected "429496482111 ", got "416611595469 "stderr
3Nov 29, 2024 18:4257,89536,747,46020,401,0001,020,0002,531,328
4Nov 29, 2024 18:4257,96840,607,14421,448,00002,510,848
5Nov 29, 2024 18:4257,97845,522,43820,431,0001,021,0002,428,928
6Nov 29, 2024 18:4257,99248,495,05420,436,0001,021,0002,269,184
7Dec 12, 2024 20:0458,06841,777,10921,485,00002,433,024
8Nov 29, 2024 18:4258,10545,991,61920,476,0001,023,0002,531,328
9Nov 29, 2024 18:4258,18148,750,52520,502,0001,025,0002,531,328
10Dec 12, 2024 20:0458,25741,738,04221,555,00002,531,328
11Nov 29, 2024 18:4258,44345,344,65221,624,00002,531,328
12Dec 12, 2024 20:0458,68445,015,33321,713,00002,531,328
13Nov 29, 2024 18:4258,68647,448,98221,714,00002,424,832
14Nov 29, 2024 18:4259,06249,699,43020,860,000993,0002,531,328