結果
問題 |
No.349 干支の置き物
|
ユーザー |
|
提出日時 | 2016-03-14 11:38:12 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 879 bytes |
コンパイル時間 | 3,145 ms |
コンパイル使用メモリ | 108,900 KB |
実行使用メモリ | 25,924 KB |
最終ジャッジ日時 | 2024-09-25 12:01:57 |
合計ジャッジ時間 | 2,457 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 WA * 7 |
コンパイルメッセージ
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 - 2) { Console.WriteLine("NO"); return; } Console.WriteLine("YES"); } } }