結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー ooh_21ooh_21
提出日時 2017-06-01 11:13:00
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 946 bytes
コンパイル時間 807 ms
コンパイル使用メモリ 110,704 KB
実行使用メモリ 29,784 KB
最終ジャッジ日時 2023-10-21 20:12:00
合計ジャッジ時間 2,820 ms
ジャッジサーバーID
(参考情報)
judge15 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 29 ms
25,476 KB
testcase_03 AC 29 ms
25,476 KB
testcase_04 AC 29 ms
25,476 KB
testcase_05 AC 65 ms
29,784 KB
testcase_06 AC 25 ms
25,376 KB
testcase_07 AC 25 ms
25,376 KB
testcase_08 AC 26 ms
25,476 KB
testcase_09 WA -
testcase_10 AC 27 ms
25,476 KB
testcase_11 AC 27 ms
25,476 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 41 ms
26,568 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 49 ms
26,776 KB
testcase_20 AC 67 ms
29,784 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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.Text;
using System.Threading.Tasks;

namespace pj9
{
    class Program
    {
        static void Main(string[] args)
        {
            int N = int.Parse(Console.ReadLine());

            int[] L = Console.ReadLine().Trim().Split(' ').Select(x => int.Parse(x)).ToArray();

            Array.Sort(L);

            int exL = L[0];
            int bestlevel = L[0];

            int count = 0;
            int maxcount = 0;

            for(int i = 1;i < N;i++)
            {
                if (exL == L[i])
                {
                    count++;
                    if(maxcount <= count)
                    {
                        bestlevel = L[i];
                    }
                }
                else
                {
                    exL = L[i];
                }
            }

            Console.WriteLine(bestlevel);
        }
    }
}
0