結果

問題 No.702 中央値を求めよ LIMITED
コンテスト
ユーザー 👑 tails
提出日時 2018-06-16 00:29:40
言語 C++11
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
CE  
(最新)
AC  
(最初)
実行時間 -
コード長 252 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 272 ms
コンパイル使用メモリ 62,216 KB
最終ジャッジ日時 2026-05-25 04:08:53
合計ジャッジ時間 1,489 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge3_0
このコードへのチャレンジ
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。

コンパイルメッセージ
main.cpp:4:1: error: 'uint32_t' does not name a type
    4 | uint32_t i,j,t,x,y=1,z=2,w=3,a[7500000];
      | ^~~~~~~~
main.cpp:3:1: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    2 | #include <algorithm>
  +++ |+#include <cstdint>
    3 | using namespace std;
main.cpp:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    5 | main(){
      | ^~~~
main.cpp: In function 'int main()':
main.cpp:6:14: error: 'x' was not declared in this scope
    6 |         cin>>x;
      |              ^
main.cpp:7:13: error: 'i' was not declared in this scope
    7 |         for(i=10000001;i--;){
      |             ^
main.cpp:8:17: error: 't' was not declared in this scope; did you mean 'tm'?
    8 |                 t=x^x<<11,x=y;y=z;z=w;w^=w>>19^t^t>>8;
      |                 ^
      |                 tm
main.cpp:8:29: error: 'y' was not declared in this scope
    8 |                 t=x^x<<11,x=y;y=z;z=w;w^=w>>19^t^t>>8;
      |                             ^
main.cpp:8:33: error: 'z' was not declared in this scope
    8 |                 t=x^x<<11,x=y;y=z;z=w;w^=w>>19^t^t>>8;
      |                                 ^
main.cpp:8:37: error: 'w' was not declared in this scope
    8 |                 t=x^x<<11,x=y;y=z;z=w;w^=w>>19^t^t>>8;
      |                                     ^
main.cpp:9:23: error: 'a' was not declared in this scope
    9 |                 w<3e9?a[j++]=w:0;
      |                       ^
main.cpp:9:25: error: 'j' was not declared in this scope
    9 |                 w<3e9?a[j++]=w:0;
      |                         ^
main.cpp:11:14: error: 'a' was not declared in this scope
   11 |         sort(a,a+j);
      |              ^
main.cpp:11:18: error: 'j' was not declared in this scope
   11 |         sort(a,a+j);
      |                  ^

ソースコード

diff #
raw source code

#include <iostream>
#include <algorithm>
using namespace std;
uint32_t i,j,t,x,y=1,z=2,w=3,a[7500000];
main(){
	cin>>x;
	for(i=10000001;i--;){
		t=x^x<<11,x=y;y=z;z=w;w^=w>>19^t^t>>8; 
		w<3e9?a[j++]=w:0;
	}
	sort(a,a+j);
	cout << a[5000000] << endl;
}
0