結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
25,968 KB
testcase_01 AC 68 ms
29,748 KB
testcase_02 AC 28 ms
25,460 KB
testcase_03 AC 27 ms
25,460 KB
testcase_04 AC 28 ms
25,460 KB
testcase_05 AC 65 ms
29,768 KB
testcase_06 AC 28 ms
25,364 KB
testcase_07 AC 26 ms
25,364 KB
testcase_08 WA -
testcase_09 AC 28 ms
25,460 KB
testcase_10 AC 30 ms
25,460 KB
testcase_11 AC 27 ms
25,460 KB
testcase_12 AC 27 ms
25,460 KB
testcase_13 AC 28 ms
25,460 KB
testcase_14 AC 52 ms
26,800 KB
testcase_15 AC 39 ms
26,556 KB
testcase_16 AC 57 ms
27,456 KB
testcase_17 AC 40 ms
26,524 KB
testcase_18 AC 58 ms
27,444 KB
testcase_19 AC 50 ms
26,760 KB
testcase_20 AC 67 ms
29,768 KB
testcase_21 AC 32 ms
25,888 KB
testcase_22 AC 44 ms
26,616 KB
testcase_23 AC 64 ms
29,648 KB
testcase_24 AC 65 ms
29,700 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.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);
            Array.Reverse(L);

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

            int count = 0;
            int maxcount = 0;

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

            Console.WriteLine(bestlevel);
        }
    }
}
0