結果
| 問題 | No.702 中央値を求めよ LIMITED |
| コンテスト | |
| ユーザー |
%20
|
| 提出日時 | 2018-06-16 00:15:09 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 62 ms / 5,000 ms |
| コード長 | 302 bytes |
| 記録 | |
| コンパイル時間 | 1,214 ms |
| コンパイル使用メモリ | 208,920 KB |
| 実行使用メモリ | 31,488 KB |
| 最終ジャッジ日時 | 2026-06-06 23:52:29 |
| 合計ジャッジ時間 | 3,959 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 25 |
コンパイルメッセージ
main.cpp:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
5 | main(){
| ^~~~
ソースコード
#include<bits/stdc++.h>
using namespace std;
const uint32_t d=3900000,T=(1u<<31)-d;
uint32_t t,x,y=1,z=2,w=3,p,q[2*d],i;
main(){
cin>>x;
for(;i<10000001;++i){
t=x^(x<<11);
x=y;
y=z;
z=w;
w^=(w>>19)^t^(t>>8);
w<T?++p:w<T+2*d&&++q[w-T];
}
i=T-1;
for(;p<5000001;)p+=q[++i-T];
cout<<i;
}
%20