結果
問題 |
No.702 中央値を求めよ LIMITED
|
ユーザー |
|
提出日時 | 2018-06-17 23:17:55 |
言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 580 ms / 5,000 ms |
コード長 | 355 bytes |
コンパイル時間 | 906 ms |
コンパイル使用メモリ | 120,064 KB |
実行使用メモリ | 22,656 KB |
最終ジャッジ日時 | 2024-11-22 22:29:06 |
合計ジャッジ時間 | 18,044 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 25 |
ソースコード
#include <cstdio> #include <algorithm> unsigned int a[6000000]; int main(){ unsigned int i=0,n=0,m=0,t,x,y=1,z=2,w=3; scanf("%u",&x); for(;i<10000001;i++){ t = (x^(x<<11)); x = y; y = z; z = w; w = (w ^ (w >> 19)) ^ (t ^ (t >> 8)); if(w<1U<<30)m++; else if(w<(1U<<31|1U<<30))a[n++]=w; } std::sort(a,a+n); printf("%u\n",a[5000000-m]); }