結果

問題 No.349 干支の置き物
ユーザー qwrtpsfgqwrtpsfg
提出日時 2017-08-25 20:56:56
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 910 bytes
コンパイル時間 880 ms
コンパイル使用メモリ 109,584 KB
実行使用メモリ 27,040 KB
最終ジャッジ日時 2024-04-23 15:22:12
合計ジャッジ時間 2,323 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 24 ms
24,656 KB
testcase_01 AC 23 ms
26,696 KB
testcase_02 AC 25 ms
24,524 KB
testcase_03 AC 22 ms
24,652 KB
testcase_04 AC 22 ms
24,520 KB
testcase_05 AC 23 ms
22,700 KB
testcase_06 AC 23 ms
26,532 KB
testcase_07 AC 21 ms
24,652 KB
testcase_08 AC 23 ms
24,608 KB
testcase_09 AC 24 ms
26,696 KB
testcase_10 AC 24 ms
24,756 KB
testcase_11 AC 22 ms
24,520 KB
testcase_12 AC 22 ms
24,524 KB
testcase_13 AC 23 ms
26,660 KB
testcase_14 AC 22 ms
24,652 KB
testcase_15 AC 22 ms
24,656 KB
testcase_16 AC 22 ms
24,524 KB
testcase_17 AC 23 ms
26,520 KB
testcase_18 AC 22 ms
26,532 KB
testcase_19 AC 22 ms
24,524 KB
testcase_20 AC 23 ms
24,732 KB
testcase_21 AC 22 ms
24,400 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 23 ms
24,396 KB
testcase_26 AC 22 ms
22,452 KB
testcase_27 AC 24 ms
24,656 KB
testcase_28 AC 22 ms
24,528 KB
testcase_29 WA -
testcase_30 AC 22 ms
24,396 KB
testcase_31 AC 22 ms
26,528 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Linq;
using System.Collections.Generic;

public class yukicoder
{
    public static void Main()
    {
		int n = int.Parse(Console.ReadLine());
		int[] eto = new int[12];
		string s = "";
		string ans = "YES";

		for(int i = 0; i <= n - 1; i++)
		{
			s = Console.ReadLine();
			
			if(s == "ne") eto[0] ++;
			else if(s == "ushi") eto[1] ++;
			else if(s == "tora") eto[2] ++;
			else if(s == "u") eto[3] ++;
			else if(s == "tatsu") eto[4] ++;
			else if(s == "mi") eto[5] ++;
			else if(s == "uma") eto[6] ++;
			else if(s == "hitsuji") eto[7] ++;
			else if(s == "saru") eto[8] ++;
			else if(s == "tori") eto[9] ++;
			else if(s == "inu") eto[10] ++;
			else if(s == "i") eto[11] ++;
		}
		
		if(eto.Max() % 2 == 0 && eto.Max() >= n / 2)
		{
			ans = "NO";
		}
		else if(eto.Max() % 2 != 0 && eto.Max() >= (n / 2) + 1)
		{
			ans = "NO";
		}

		Console.WriteLine(ans);

    }
}

0