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 listMay 23, 2024 07:34Maxim ElchuginMaxim ElchuginScore: 94,322Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 23, 2024 07:3493,09558,515,59832,419,0002,026,0002,281,472
2May 23, 2024 07:3093,31455,160,60334,526,00002,510,848
3May 23, 2024 07:3493,39757,553,06033,541,0001,016,0002,506,752
4May 23, 2024 07:3093,53058,670,35532,571,0002,035,0002,510,848
5May 23, 2024 07:3493,66561,155,13432,618,0002,038,0002,281,472
6May 23, 2024 07:3493,71160,786,84934,673,00002,281,472
7May 23, 2024 07:3093,78160,669,09032,658,0002,041,0002,510,848
8May 23, 2024 07:3094,16259,653,41532,850,0001,990,0002,281,472
9May 23, 2024 07:3094,20561,807,22132,865,0001,991,0002,506,752
10May 23, 2024 07:3494,22262,740,33530,878,0003,984,0002,506,752
11May 23, 2024 07:3494,27357,196,13133,856,0001,025,0002,281,472
12May 23, 2024 07:3094,30361,119,40932,899,0001,993,0002,351,104
13May 23, 2024 07:3494,32262,915,19932,905,0001,994,0002,519,040
14May 23, 2024 07:3094,51158,241,39732,971,0001,998,0002,281,472
15May 23, 2024 07:3494,53861,775,34432,981,0001,998,0002,523,136
16May 23, 2024 07:3094,54163,325,40232,982,0001,998,0002,281,472
17May 23, 2024 07:3094,64365,856,04531,016,0004,002,0002,281,472
18May 23, 2024 07:3494,81155,102,40432,074,0003,006,0002,351,104
19May 23, 2024 07:3097,581102,840,29336,105,01402,248,704
20May 23, 2024 07:3097,714103,515,33436,154,36402,232,320
21May 23, 2024 07:3497,773117,586,70736,176,06402,236,416
22May 23, 2024 07:3498,012108,790,63936,264,28802,240,512
23May 23, 2024 07:3098,079100,753,12636,289,05202,244,608
24May 23, 2024 07:3498,082106,678,01236,290,37002,232,320