結果
問題 | No.702 中央値を求めよ LIMITED |
ユーザー |
![]() |
提出日時 | 2018-06-15 23:19:21 |
言語 | PyPy3 (7.3.15) |
結果 |
MLE
|
実行時間 | - |
コード長 | 459 bytes |
コンパイル時間 | 147 ms |
コンパイル使用メモリ | 82,104 KB |
実行使用メモリ | 70,044 KB |
最終ジャッジ日時 | 2024-06-30 15:26:37 |
合計ジャッジ時間 | 6,028 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | MLE * 2 |
other | MLE * 25 |
ソースコード
seed = x = int(input()) y,z,w = 1,2,3 def generate(): global x,y,z,w t = (x^(x<<11)) % (1<<32) x,y,z = y,z,w w = (w ^ (w>>19)) ^ (t ^ (t>>8)) return w % (1<<32) larger = smaller = 0 h_sh = (1<<31) + (1<<21) l_sh = (1<<31) - (1<<21) arr = [] for i in range(10**7+1): g = generate() if g > h_sh: larger += 1 elif g < l_sh: smaller += 1 else: arr.append(g) n = 5*10**6 print(sorted(arr)[n-smaller])