結果
問題 |
No.702 中央値を求めよ LIMITED
|
ユーザー |
|
提出日時 | 2018-06-18 06:09:12 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 368 bytes |
コンパイル時間 | 533 ms |
コンパイル使用メモリ | 64,508 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-30 16:49:07 |
合計ジャッジ時間 | 13,672 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 1 |
other | AC * 18 WA * 7 |
コンパイルメッセージ
main.cpp:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main() | ^~~~
ソースコード
#include<iostream> using namespace std; unsigned int m,seed,n=1e7+1,t,x,y,z,w,f=2146000000L,l=2148000000L; main() { cin>>seed; while(l-f>1) { m=((long)f+(long)l)/2; x=seed;y=1,z=2,w=3; int cnt=0; for(int i=0;i<n;i++) { t=(x^(x<<11)); x=y,y=z,z=w; w=(w^(w>>19))^(t^(t>>8)); cnt+=w<=m; } if(cnt<5000001)f=m; else l=m; } cout<<l<<endl; }