結果
| 問題 |
No.304 鍵(1)
|
| コンテスト | |
| ユーザー |
kuuso1
|
| 提出日時 | 2015-11-27 23:00:33 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 87 ms / 2,000 ms |
| コード長 | 1,635 bytes |
| コンパイル時間 | 2,030 ms |
| コンパイル使用メモリ | 107,520 KB |
| 実行使用メモリ | 36,952 KB |
| 平均クエリ数 | 447.50 |
| 最終ジャッジ日時 | 2024-07-16 21:49:11 |
| 合計ジャッジ時間 | 3,166 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 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);
var s=rs();
if(s=="unlocked")return;
}
}
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