結果

問題 No.349 干支の置き物
ユーザー huffman56huffman56
提出日時 2022-11-05 09:41:43
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 839 bytes
コンパイル時間 3,284 ms
コンパイル使用メモリ 102,116 KB
実行使用メモリ 25,556 KB
最終ジャッジ日時 2023-09-26 10:01:27
合計ジャッジ時間 6,084 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
23,448 KB
testcase_01 AC 58 ms
23,400 KB
testcase_02 AC 57 ms
21,444 KB
testcase_03 AC 59 ms
21,348 KB
testcase_04 AC 58 ms
21,360 KB
testcase_05 AC 58 ms
21,456 KB
testcase_06 AC 58 ms
21,488 KB
testcase_07 AC 58 ms
21,452 KB
testcase_08 AC 58 ms
19,320 KB
testcase_09 AC 59 ms
21,424 KB
testcase_10 AC 59 ms
21,440 KB
testcase_11 AC 58 ms
21,540 KB
testcase_12 AC 60 ms
23,524 KB
testcase_13 AC 59 ms
21,416 KB
testcase_14 AC 59 ms
23,412 KB
testcase_15 AC 58 ms
21,360 KB
testcase_16 AC 59 ms
21,532 KB
testcase_17 AC 58 ms
21,444 KB
testcase_18 AC 57 ms
21,360 KB
testcase_19 AC 58 ms
21,396 KB
testcase_20 AC 57 ms
19,424 KB
testcase_21 AC 58 ms
23,388 KB
testcase_22 WA -
testcase_23 AC 58 ms
21,344 KB
testcase_24 WA -
testcase_25 AC 58 ms
21,548 KB
testcase_26 AC 59 ms
23,372 KB
testcase_27 AC 59 ms
23,344 KB
testcase_28 AC 58 ms
23,580 KB
testcase_29 WA -
testcase_30 AC 58 ms
21,408 KB
testcase_31 AC 59 ms
21,348 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.Collections.Generic;
using System.Linq;
using System.Numerics;
using static System.Math;

namespace SortItems
{
    class Program
    {
        static void Main(string[] args)
        {
            var n = int.Parse(Console.ReadLine());
            var d = new Dictionary<string, int>();

            for (var i = 0; i < n; i++)
            {
                var s = Console.ReadLine();
                if (d.ContainsKey(s))
                {
                    d[s]++;
                }
                else
                {
                    d[s] = 1;
                }
            }

            if (d.Values.Max() < (n / 2) + 1)
            {
                Console.WriteLine("YES");
            }
            else
            {
                Console.WriteLine("NO");
            }

        }
    }
}
0