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:42Franek KortaFranek KortaError
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:4100000Error: expected "429496525788 ", got "429496523126 "
2Sep 2, 2023 21:4261,24350,171,78822,660,00002,387,968
3Sep 2, 2023 21:4261,28653,628,25121,646,0001,030,0002,519,040
4Sep 2, 2023 21:4261,29752,174,00122,680,00002,519,040
5Sep 2, 2023 21:4261,43249,428,78822,730,00002,519,040
6Sep 2, 2023 21:4261,68648,697,05120,840,0001,984,0002,519,040
7Sep 2, 2023 21:4261,73049,066,40521,847,000993,0002,519,040
8Sep 2, 2023 21:4261,73850,858,87220,857,0001,986,0002,383,872
9Sep 2, 2023 21:4261,74947,565,97320,861,0001,986,0002,519,040
10Sep 2, 2023 21:4261,75153,795,52317,881,0004,967,0002,519,040
11Sep 2, 2023 21:4261,75750,007,83422,850,00002,392,064
12Sep 2, 2023 21:4261,76551,874,02620,866,0001,987,0002,523,136
13Sep 2, 2023 21:4261,78150,203,41921,866,000993,0002,396,160
14Sep 2, 2023 21:4261,78147,488,35821,866,000993,0002,396,160
15Sep 2, 2023 21:4261,78150,971,96320,872,0001,987,0002,387,968
16Sep 2, 2023 21:4261,80051,599,60518,890,0003,976,0002,519,040
17Sep 2, 2023 21:4261,81949,224,90619,890,0002,983,0002,506,752
18Sep 2, 2023 21:4261,89249,249,61421,905,000995,0002,519,040
19Sep 2, 2023 21:4261,96551,155,87120,934,0001,993,0002,519,040
20Sep 2, 2023 21:4265,41099,413,61424,201,56202,248,704
21Sep 2, 2023 21:4265,569106,210,03824,260,52902,248,704
22Sep 2, 2023 21:4265,586107,089,01024,266,72902,236,416
23Sep 2, 2023 21:4265,68081,735,86124,301,52902,244,608
24Sep 2, 2023 21:4265,796106,948,08124,344,50802,252,800
25Sep 2, 2023 21:4265,92990,590,34424,393,61602,256,896