結果
問題 | No.24 数当てゲーム |
ユーザー |
![]() |
提出日時 | 2015-07-21 00:08:12 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 25 ms / 5,000 ms |
コード長 | 1,216 bytes |
コンパイル時間 | 915 ms |
コンパイル使用メモリ | 103,808 KB |
実行使用メモリ | 17,920 KB |
最終ジャッジ日時 | 2024-07-08 11:26:22 |
合計ジャッジ時間 | 1,721 ms |
ジャッジサーバーID (参考情報) |
judge2 / 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;using System.Collections.Generic;using System.Linq;using System.Text;class yc2{static void Main(){int N = int.Parse(Console.ReadLine());int temp;int[] ary = {0,1,2,3,4,5,6,7,8,9};int[] temps = new int[4];string[] str1;for (int i = 0; i < N; i++){str1 = Console.ReadLine().Split();if (str1[4] == "NO"){for (int j = 0; j < 4; j++){temp = int.Parse(str1[j]);ary[temp] = -1;}}else{for (int j = 0; j < 4; j++){temps[j] = int.Parse(str1[j]);}for (int j = 0; j < 10; j++){if (ary[j] != temps[0] && ary[j] != temps[1] &&ary[j] != temps[2] && ary[j] != temps[3]){ary[j] = -1;}}}}for (int i = 0; i < 10; i++){if (ary[i] != -1) Console.WriteLine(ary[i]);}}}