結果
| 問題 |
No.349 干支の置き物
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-08-25 21:05:11 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 923 bytes |
| コンパイル時間 | 887 ms |
| コンパイル使用メモリ | 110,472 KB |
| 実行使用メモリ | 26,824 KB |
| 最終ジャッジ日時 | 2024-10-15 15:44:04 |
| 合計ジャッジ時間 | 2,653 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 26 WA * 3 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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(n % 2 == 0 && eto.Max() > n / 2)
{
ans = "NO";
}
else if(n % 2 != 0 && eto.Max() > (n / 2) + 1)
{
ans = "NO";
Console.WriteLine("hoge2");
}
Console.WriteLine(ans);
}
}