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 8, 2024 08:56Joad 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 8, 2024 08:5500000Error: expected "429496431298 ", got "343597191977 "
2May 8, 2024 08:5500000Error: expected "429496496827 ", got "412316647506 "
3May 8, 2024 08:5664,41449,391,66522,840,000993,0002,277,376
4May 8, 2024 08:5664,44953,356,34222,853,000993,0002,277,376
5May 8, 2024 08:5664,45154,072,95921,860,0001,987,0002,273,280
6May 8, 2024 08:5664,45752,863,87921,862,0001,987,0002,531,328
7May 8, 2024 08:5664,45752,932,58421,862,0001,987,0002,269,184
8May 8, 2024 08:5664,47654,736,40622,862,000994,0002,523,136
9May 8, 2024 08:5664,58449,994,66521,905,0001,991,0002,269,184
10May 8, 2024 08:5664,68947,469,70821,941,0001,994,0002,269,184
11May 8, 2024 08:5665,18147,739,37822,108,0002,009,0002,269,184
12May 8, 2024 08:5668,098110,238,04025,196,24102,252,800
13May 8, 2024 08:5668,33494,031,96925,283,72402,265,088
14May 8, 2024 08:5668,440100,100,60525,322,78702,265,088
15May 8, 2024 08:5668,449105,062,72425,326,19402,281,472
16May 8, 2024 08:5669,049103,794,64125,548,03502,273,280
17May 8, 2024 08:5669,26488,493,61525,627,57702,269,184