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 listSep 2, 2023 21:06Franek KortaFranek KortaScore: 61,803Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 2, 2023 21:0861,41150,578,57421,690,0001,032,0002,445,312
2Sep 2, 2023 21:0661,70347,158,38321,793,0001,037,0002,445,312
3Sep 2, 2023 21:0661,74148,190,03119,865,0002,979,0002,437,120
4Sep 2, 2023 21:0861,74650,175,91421,853,000993,0002,531,328
5Sep 2, 2023 21:0861,77355,053,93021,863,000993,0002,531,328
6Sep 2, 2023 21:0661,77646,471,21421,864,000993,0002,437,120
7Sep 2, 2023 21:0861,77849,812,74921,865,000993,0002,441,216
8Sep 2, 2023 21:0661,78444,978,90122,860,00002,265,088
9Sep 2, 2023 21:0861,78449,920,00022,860,00002,445,312
10Sep 2, 2023 21:0861,78946,609,75320,874,0001,988,0002,527,232
11Sep 2, 2023 21:0661,79753,234,63721,871,000994,0002,441,216
12Sep 2, 2023 21:0861,80054,717,49121,872,000994,0002,441,216
13Sep 2, 2023 21:0861,80345,873,39621,873,000994,0002,441,216
14Sep 2, 2023 21:0661,80349,285,55621,873,000994,0002,441,216
15Sep 2, 2023 21:0661,86548,940,02221,850,0001,040,0002,437,120
16Sep 2, 2023 21:0661,92745,789,42921,917,000996,0002,449,408
17Sep 2, 2023 21:0861,95749,472,73421,928,000996,0002,445,312
18Sep 2, 2023 21:0661,95945,388,29019,935,0002,990,0002,527,232
19Sep 2, 2023 21:0665,51784,513,55324,241,15202,170,880
20Sep 2, 2023 21:0865,56798,375,97124,259,96802,297,856
21Sep 2, 2023 21:0665,72184,493,99724,316,77502,179,072
22Sep 2, 2023 21:0865,87595,179,58024,373,77602,179,072
23Sep 2, 2023 21:0865,94390,151,16424,398,86002,297,856
24Sep 2, 2023 21:0665,949109,781,68424,400,96202,179,072