結果
| 問題 | No.304 鍵(1) |
| コンテスト | |
| ユーザー |
kuuso1
|
| 提出日時 | 2015-11-27 22:53:35 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 1,592 bytes |
| コンパイル時間 | 2,714 ms |
| コンパイル使用メモリ | 107,136 KB |
| 実行使用メモリ | 36,440 KB |
| 平均クエリ数 | 1000.00 |
| 最終ジャッジ日時 | 2024-07-16 06:40:00 |
| 合計ジャッジ時間 | 4,753 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 6 |
コンパイルメッセージ
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;
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;
}
}
kuuso1