結果
問題 |
No.349 干支の置き物
|
ユーザー |
|
提出日時 | 2016-03-14 11:46:29 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 881 bytes |
コンパイル時間 | 746 ms |
コンパイル使用メモリ | 104,192 KB |
実行使用メモリ | 17,792 KB |
最終ジャッジ日時 | 2024-09-25 12:02:29 |
合計ジャッジ時間 | 2,250 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 WA * 4 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; namespace No349 { class Program { static void Main(string[] args) { string[] eto = { "ne", "ushi", "tora", "u", "tatsu", "mi", "uma", "hitsuji", "saru", "tori", "inu", "i" }; int n = int.Parse(Console.ReadLine()); string data; int[] count = new int[eto.Length]; bool result = true; for (int i = 0; i < n; i++) { data = Console.ReadLine(); for (int j = 0; j < eto.Length; j++) if (data.Equals(eto[j])) count[j]++; } for (int i = 0; i < eto.Length; i++) if (count[i] > n - 1) { Console.WriteLine("NO"); return; } Console.WriteLine("YES"); } } }