結果
| 問題 | No.24 数当てゲーム | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2020-04-02 04:47:16 | 
| 言語 | C#(csc) (csc 3.9.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 29 ms / 5,000 ms | 
| コード長 | 751 bytes | 
| コンパイル時間 | 3,191 ms | 
| コンパイル使用メモリ | 112,692 KB | 
| 実行使用メモリ | 26,104 KB | 
| 最終ジャッジ日時 | 2024-06-27 17:04:55 | 
| 合計ジャッジ時間 | 3,423 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 10 | 
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
public class Program
{
	static void Main()
	{
		int N = int.Parse(Console.ReadLine());
		bool[] numbers = new bool[10];
		for (int i = 0; i < numbers.Length; i++)
		{
			numbers[i] = true;
		}
		for (int i = 0; i < N; i++)
		{
			string[] inputs = Console.ReadLine().Split(' ');
			int[] n = new int[4];
			for (int j = 0; j < 4; j++)
			{
				n[j] = int.Parse(inputs[j]);
			}
			if (inputs[4] == "YES")
			{
				for (int j = 0; j < 10; j++){
					if (! Array.Exists(n, e => e == j))
					{
						numbers[j] = false;
					}
				}
			}
			else
			{
				for (int j = 0; j < 4; j++){
					numbers[n[j]] = false;
				}
			}
			Console.Error.WriteLine(String.Concat(numbers));
		}
		Console.WriteLine(Array.FindIndex(numbers, e => e));
	}
}
            
            
            
        