結果

問題 No.304 鍵(1)
ユーザー kuuso1kuuso1
提出日時 2015-11-27 22:53:35
言語 C#(csc)
(csc 3.9.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 1,592 bytes
コンパイル時間 6,014 ms
コンパイル使用メモリ 108,444 KB
実行使用メモリ 40,000 KB
平均クエリ数 1000.00
最終ジャッジ日時 2023-09-23 06:45:50
合計ジャッジ時間 7,093 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

class TEST{
	static void Main(){
		Sol mySol =new Sol();
		mySol.Solve();
	}
}

class Sol{
	public void Solve(){
		var rnd=new Xor128();
		HashSet<int> H=new HashSet<int>();
		while(H.Count<1000){
			
			int a=0;
			while(true){
				a=rnd.Next(1000);
				if(H.Contains(a))continue;
				break;
			}
			Console.WriteLine("{0:D3}",a);
			H.Add(a);
		}
	}

	public Sol(){
	}




	static String rs(){return Console.ReadLine();}
	static int ri(){return int.Parse(Console.ReadLine());}
	static long rl(){return long.Parse(Console.ReadLine());}
	static double rd(){return double.Parse(Console.ReadLine());}
	static String[] rsa(){return Console.ReadLine().Split(' ');}
	static int[] ria(){return Array.ConvertAll(Console.ReadLine().Split(' '),e=>int.Parse(e));}
	static long[] rla(){return Array.ConvertAll(Console.ReadLine().Split(' '),e=>long.Parse(e));}
	static double[] rda(){return Array.ConvertAll(Console.ReadLine().Split(' '),e=>double.Parse(e));}
}

class Xor128{
	static uint x = 123456789;
	static uint y = 362436069;
	static uint z = 521288629;
	static uint w = 88675123; 
	uint t;
	
	public Xor128(){
	}
	
	public Xor128(uint seed){
		z ^= seed;
		z ^= z >> 21; z ^= z << 35; z ^= z >> 4;
	}
	
	
	public uint Next(){
		t = x ^ (x << 11);
		x = y; y = z; z = w;
		return w = (w ^ (w >> 19)) ^ (t ^ (t >> 8));
	}
	public int Next(int ul){
		return NextI(0,ul-1);
	}
	public int NextI(int from,int to){
		int mod=to-from+1;
		int ret=(int)(Next()%mod);
		return ret+from;
	}
}
0