Median Sergey Svistunov

Find the median of 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 median value, printed as a decimal string. The median is defined as the element at index N/2 (i.e., a[50000000]) in the sorted array.

Back to listFeb 21, 2024 14:06Huy Duc LeHuy Duc LeScore: 11,701Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Feb 21, 2024 14:069,624101,984,26365,933,00012,986,0002,482,176
2Feb 21, 2024 14:069,812105,330,64859,341,00021,121,0002,371,584
3Feb 21, 2024 14:069,982109,172,86266,880,00014,973,0002,473,984
4Feb 21, 2024 14:0610,188150,284,51183,539,34802,187,264
5Feb 21, 2024 14:0610,281104,612,65168,249,00016,058,0002,445,312
6Feb 21, 2024 14:0610,680159,543,37387,575,14502,310,144
7Feb 21, 2024 14:0611,701120,300,97173,961,00021,988,0002,326,528
8Feb 21, 2024 14:0611,712123,496,91576,031,00020,008,0002,523,136
9Feb 21, 2024 14:0611,806121,239,22572,859,00023,953,0002,420,736
10Feb 21, 2024 14:0611,857120,666,29881,193,00016,038,0002,514,944
11Feb 21, 2024 14:0612,701175,524,639104,149,58502,240,512
12Feb 21, 2024 14:0614,613143,618,860100,851,00018,972,0002,523,136