結果
| 問題 | 
                            No.349 干支の置き物
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2016-05-10 23:14:05 | 
| 言語 | C#(csc)  (csc 3.9.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 25 ms / 2,000 ms | 
| コード長 | 918 bytes | 
| コンパイル時間 | 1,007 ms | 
| コンパイル使用メモリ | 109,020 KB | 
| 実行使用メモリ | 17,792 KB | 
| 最終ジャッジ日時 | 2024-11-17 07:32:00 | 
| 合計ジャッジ時間 | 2,511 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 29 | 
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
class A {
    static int[]B = new int[12];
    static void Main() {
        string[] eto = { "ne", "ushi", "tora", "u", "tatsu", "mi", "hitsuji", "uma", "saru", "tori", "inu", "i" };
        int N = int.Parse(Console.ReadLine());
       // int[] B = new int[12];
        string[] A = new string[N];
        for(int i = 0; i < N; i++) {
            A[i] = Console.ReadLine();
        }
        for(int i = 0; i < 12; i++) {
            int c = 0;
            for(int j = 0; j < N; j++) {
                if (A[j] == eto[i]) {
                    c++;
                }
            }
            B[i] = c;
        }
        bool s = false;
        for(int i = 0; i < 12; i++) {
            if ((N + 1) / 2 < B[i]) {
                s = true;
            }
        }
        if (s) {
            Console.WriteLine("NO");
        }
        else {
            Console.WriteLine("YES");
        }
    
    }
}