結果
問題 | No.702 中央値を求めよ LIMITED |
ユーザー |
|
提出日時 | 2018-06-17 23:43:46 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 192 ms / 5,000 ms |
コード長 | 355 bytes |
コンパイル時間 | 315 ms |
コンパイル使用メモリ | 43,136 KB |
最終ジャッジ日時 | 2025-01-05 14:38:01 |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 25 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:6:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%u",&x); | ~~~~~^~~~~~~~~
ソースコード
#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<0x70000000)m++;else if(w<0x90000000)a[n++]=w;}std::sort(a,a+n);printf("%u\n",a[5000000-m]);}