結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー TaK7907TaK7907
提出日時 2017-10-20 02:08:34
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 874 bytes
コンパイル時間 3,198 ms
コンパイル使用メモリ 103,364 KB
実行使用メモリ 29,172 KB
最終ジャッジ日時 2023-08-13 12:49:04
合計ジャッジ時間 5,282 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
24,092 KB
testcase_01 AC 89 ms
25,096 KB
testcase_02 AC 60 ms
21,580 KB
testcase_03 AC 59 ms
21,684 KB
testcase_04 AC 60 ms
23,612 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 59 ms
21,632 KB
testcase_08 AC 59 ms
21,620 KB
testcase_09 AC 60 ms
23,724 KB
testcase_10 AC 60 ms
21,684 KB
testcase_11 AC 60 ms
21,732 KB
testcase_12 AC 60 ms
21,580 KB
testcase_13 AC 61 ms
23,612 KB
testcase_14 AC 81 ms
23,364 KB
testcase_15 AC 73 ms
24,696 KB
testcase_16 AC 85 ms
26,456 KB
testcase_17 AC 72 ms
22,552 KB
testcase_18 AC 86 ms
22,280 KB
testcase_19 AC 79 ms
23,220 KB
testcase_20 AC 90 ms
29,172 KB
testcase_21 AC 68 ms
22,128 KB
testcase_22 AC 76 ms
22,700 KB
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;

public class Program {
    public static int Solver(System.IO.TextReader reader) {
        reader.ReadLine();
        var l = MyLib.GetIntListFromTextReader( reader, ' ' );
        int[] n = { 0, 0, 0, 0, 0, 0 };
        foreach (var v in l) {
            ++n[ v - 1 ];
        }
        int maxNum = n.Length - 1;
        for (var i = n.Length - 1; i != 1; --i) {
            if (n[ i - 1 ] > n[ maxNum ]) maxNum = i - 1;
        }
        return maxNum + 1;
    }

    private static void Main() {
        Console.WriteLine( Solver( Console.In ) );
    }
}

//--- MyLib ---

public class MyLib {
    public static List<int> GetIntListFromTextReader(System.IO.TextReader reader, char delimitor) {
        return reader.ReadLine().Split( delimitor ).ToList<string>().ConvertAll<int>( int.Parse );
    }
}

0