結果
| 問題 | 
                            No.702 中央値を求めよ LIMITED
                             | 
                    
| コンテスト | |
| ユーザー | 
                             mban
                         | 
                    
| 提出日時 | 2018-06-15 22:51:40 | 
| 言語 | C#(csc)  (csc 3.9.0)  | 
                    
| 結果 | 
                             
                                MLE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 2,381 bytes | 
| コンパイル時間 | 862 ms | 
| コンパイル使用メモリ | 112,200 KB | 
| 実行使用メモリ | 66,664 KB | 
| 最終ジャッジ日時 | 2024-06-30 15:18:15 | 
| 合計ジャッジ時間 | 102,313 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | MLE * 2 | 
| other | MLE * 25 | 
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Runtime.Remoting.Contexts;
namespace Contest
{
    class Scanner
    {
        private string[] line = new string[0];
        private int index = 0;
        public string Next()
        {
            if (line.Length <= index)
            {
                line = Console.ReadLine().Split(' ');
                index = 0;
            }
            var res = line[index];
            index++;
            return res;
        }
        public int NextInt()
        {
            return int.Parse(Next());
        }
        public long NextLong()
        {
            return long.Parse(Next());
        }
        public string[] Array()
        {
            line = Console.ReadLine().Split(' ');
            index = line.Length;
            return line;
        }
        public int[] IntArray()
        {
            var array = Array();
            var result = new int[array.Length];
            for (int i = 0; i < array.Length; i++)
            {
                result[i] = int.Parse(array[i]);
            }
            return result;
        }
        public long[] LongArray()
        {
            var array = Array();
            var result = new long[array.Length];
            for (int i = 0; i < array.Length; i++)
            {
                result[i] = long.Parse(array[i]);
            }
            return result;
        }
        public uint NextUint()
        {
            return uint.Parse(Next());
        }
    }
    class Program
    {
        private uint Seed;
        private uint x = 0, y = 1, z = 2, w = 3;
        private void Scan()
        {
            var sc = new Scanner();
            Seed = sc.NextUint();
        }
        uint Generate()
        {
            uint t = (x ^ (x << 11));
            x = y;
            y = z;
            z = w;
            w = (w ^ (w >> 19)) ^ (t ^ (t >> 8));
            return w;
        }
        public void Solve()
        {
            Scan();
            x = Seed;
            var ans = new uint[10000001];
            for (int i = 0; i < 10000001; i++)
            {
                ans[i] = Generate();
            }
            Array.Sort(ans);
            Console.WriteLine(ans[5000000]);
        }
        static void Main() => new Program().Solve();
    }
}
            
            
            
        
            
mban