結果
問題 |
No.702 中央値を求めよ LIMITED
|
ユーザー |
|
提出日時 | 2018-06-18 06:09:49 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 368 bytes |
コンパイル時間 | 541 ms |
コンパイル使用メモリ | 64,128 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-08 00:54:45 |
合計ジャッジ時間 | 12,918 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 22 WA * 3 |
コンパイルメッセージ
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=2145000000L,l=2149000000L; 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; }