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 12, 2021 22:01piculpiculScore: 108,751Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 12, 2021 22:01105,40561,315,46337,000,0002,000,0002,519,040
2Sep 12, 2021 22:01106,27862,432,67738,315,0001,008,0002,281,472
3Sep 12, 2021 22:01106,85768,000,56638,524,0001,013,0002,281,472
4Sep 12, 2021 22:01106,99766,589,56738,574,0001,015,0002,519,040
5Sep 12, 2021 22:01107,69571,044,56138,851,000996,0002,281,472
6Sep 12, 2021 22:01107,70067,537,55237,857,0001,992,0002,281,472
7Sep 12, 2021 22:01107,71464,907,80338,858,000996,0002,281,472
8Sep 12, 2021 22:01108,10064,171,80138,998,000999,0002,281,472
9Sep 12, 2021 22:01108,15167,671,34638,016,0002,000,0002,281,472
10Sep 12, 2021 22:01108,17863,669,65738,025,0002,001,0002,523,136
11Sep 12, 2021 22:01108,42765,583,24538,113,0002,005,0002,519,040
12Sep 12, 2021 22:01108,44662,611,04838,119,0002,006,0002,510,848
13Sep 12, 2021 22:01108,75167,137,65938,227,0002,011,0002,523,136
14Sep 12, 2021 22:01109,01165,950,56738,318,0002,016,0002,281,472
15Sep 12, 2021 22:01109,43061,850,13139,477,0001,012,0002,519,040
16Sep 12, 2021 22:01109,68167,925,36739,593,000989,0002,523,136
17Sep 12, 2021 22:01110,63864,486,59638,940,0001,996,0002,265,088
18Sep 12, 2021 22:01111,03267,522,82739,078,0002,004,0002,281,472
19Sep 12, 2021 22:01116,823108,752,92743,224,59202,244,608
20Sep 12, 2021 22:01117,285115,541,41543,395,47702,260,992
21Sep 12, 2021 22:01117,335111,417,67443,413,80402,244,608
22Sep 12, 2021 22:01117,893103,724,17043,620,23702,244,608
23Sep 12, 2021 22:01118,612107,120,46243,886,38302,248,704
24Sep 12, 2021 22:01122,320106,176,84645,258,53202,260,992