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 9, 2023 21:21Franek KortaFranek KortaScore: 88,103Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 9, 2023 21:2185,87692,577,81731,773,96402,285,568
2Apr 9, 2023 21:2386,00397,851,65031,820,96702,297,856
3Apr 9, 2023 21:2186,09495,146,35631,854,80802,293,760
4Apr 9, 2023 21:2186,26558,784,69928,926,0002,992,0002,269,184
5Apr 9, 2023 21:2186,55949,880,76430,026,0002,001,0002,523,136
6Apr 9, 2023 21:2186,79751,081,04231,112,0001,003,0002,527,232
7Apr 9, 2023 21:2186,81159,499,77130,113,0002,007,0002,265,088
8Apr 9, 2023 21:2187,457104,430,89032,358,92602,170,880
9Apr 9, 2023 21:2387,58292,251,98032,405,49302,285,568
10Apr 9, 2023 21:2187,59256,235,26731,397,0001,012,0002,269,184
11Apr 9, 2023 21:2187,749101,620,45632,467,28302,289,664
12Apr 9, 2023 21:2187,77357,259,50432,476,00002,420,736
13Apr 9, 2023 21:2187,97855,455,76732,552,00002,424,832
14Apr 9, 2023 21:2188,10361,053,57932,598,00002,531,328
15Apr 9, 2023 21:2188,73059,161,13631,836,000994,0002,527,232
16Apr 9, 2023 21:2188,82260,876,68331,869,000995,0002,531,328
17Apr 9, 2023 21:2188,91458,356,31131,902,000996,0002,424,832
18Apr 9, 2023 21:2189,60058,504,44732,148,0001,004,0002,428,928
19Apr 9, 2023 21:2189,795104,232,98333,224,11602,240,512
20Apr 9, 2023 21:2189,87859,673,08230,232,0003,023,0002,265,088
21Apr 9, 2023 21:2390,09492,866,52933,334,79602,289,664
22Apr 9, 2023 21:2190,13254,414,93032,339,0001,010,0002,531,328
23Apr 9, 2023 21:2190,34690,647,73233,428,00702,293,760
24Apr 9, 2023 21:2191,00562,410,74231,692,0001,980,0002,424,832
25Apr 9, 2023 21:2193,74961,215,09433,667,0001,020,0002,428,928
26Apr 9, 2023 21:2194,83061,604,05832,080,0003,007,0002,265,088
27Apr 9, 2023 21:2196,67060,610,63334,775,000993,0002,527,232