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 6, 2022 14:29Eugene ZhydzetskiEugene ZhydzetskiScore: 111,289Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 6, 2022 15:24110,59573,514,53839,897,0001,023,0002,531,328
2Sep 6, 2022 14:29110,61468,804,83839,929,000998,0002,334,720
3Sep 6, 2022 15:24110,64966,840,93838,943,0001,997,0002,535,424
4Sep 6, 2022 15:24110,66265,240,87638,948,0001,997,0002,523,136
5Sep 6, 2022 14:29110,67673,215,86039,952,000998,0002,334,720
6Sep 6, 2022 14:29110,92269,418,90540,040,0001,001,0002,334,720
7Sep 6, 2022 14:29110,94366,902,58839,047,0002,002,0002,527,232
8Sep 6, 2022 15:24111,00864,070,82239,070,0002,003,0002,334,720
9Sep 6, 2022 15:24111,01962,516,99440,076,0001,001,0002,531,328
10Sep 6, 2022 15:24111,03273,272,10840,080,0001,002,0002,334,720
11Sep 6, 2022 14:29111,04968,445,32238,082,0003,006,0002,527,232
12Sep 6, 2022 14:29111,23270,104,19339,149,0002,007,0002,334,720
13Sep 6, 2022 15:24111,28962,970,81739,169,0002,008,0002,531,328
14Sep 6, 2022 14:29111,33864,673,83739,186,0002,009,0002,527,232
15Sep 6, 2022 15:24111,37061,239,51838,192,0003,015,0002,531,328
16Sep 6, 2022 14:29111,42464,843,59439,216,0002,011,0002,334,720
17Sep 6, 2022 14:29111,69267,187,08039,311,0002,015,0002,334,720
18Sep 6, 2022 15:24111,89764,218,01040,393,0001,009,0002,527,232
19Sep 6, 2022 14:29113,458100,802,60841,979,35402,195,456
20Sep 6, 2022 15:24113,680104,843,32842,061,51902,195,456
21Sep 6, 2022 14:29113,791106,527,45042,102,77002,195,456
22Sep 6, 2022 15:24113,817106,448,73942,112,28602,195,456
23Sep 6, 2022 14:29114,543104,263,92942,380,96202,199,552
24Sep 6, 2022 15:24114,690105,008,21842,435,15602,191,360