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 listNov 28, 2024 20:09Joad 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 28, 2024 20:0900000Error: expected "429496452348 ", got "373661940142 "stderr
2Nov 28, 2024 20:0900000Error: expected "429496537909 ", got "429496536292 "stderr
3Nov 28, 2024 20:0900000Error: expected "429496530039 ", got "429496529023 "stderr
4Nov 28, 2024 20:0900000Error: expected "429496502899 ", got "429496500557 "stderr
5Nov 28, 2024 20:1059,50845,742,36921,018,0001,000,0002,510,848
6Nov 28, 2024 20:1059,52437,551,63621,023,0001,001,0002,433,024
7Nov 28, 2024 20:1059,53051,839,54020,024,0002,002,0002,531,328
8Nov 28, 2024 20:1059,54947,706,30420,030,0002,003,0002,428,928
9Nov 28, 2024 20:1059,61643,002,22721,056,0001,002,0002,531,328
10Nov 28, 2024 20:0959,67845,038,29321,078,0001,003,0002,433,024
11Nov 28, 2024 20:1059,69750,654,02021,084,0001,004,0002,531,328
12Nov 28, 2024 20:1059,70052,606,17021,085,0001,004,0002,531,328
13Nov 28, 2024 20:1059,80547,794,20621,123,0001,005,0002,420,736
14Nov 28, 2024 20:0959,89549,090,42321,154,0001,007,0002,433,024
15Nov 28, 2024 20:1059,95138,270,79721,174,0001,008,0002,531,328
16Nov 28, 2024 20:0961,87653,123,28921,899,000995,0002,269,184