結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー TaK7907TaK7907
提出日時 2017-10-20 02:29:50
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 92 ms / 5,000 ms
コード長 874 bytes
コンパイル時間 2,228 ms
コンパイル使用メモリ 103,324 KB
実行使用メモリ 29,156 KB
最終ジャッジ日時 2023-09-08 15:17:01
合計ジャッジ時間 5,061 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
21,948 KB
testcase_01 AC 88 ms
27,056 KB
testcase_02 AC 60 ms
21,608 KB
testcase_03 AC 60 ms
21,576 KB
testcase_04 AC 59 ms
21,540 KB
testcase_05 AC 90 ms
29,156 KB
testcase_06 AC 60 ms
21,556 KB
testcase_07 AC 61 ms
23,604 KB
testcase_08 AC 62 ms
23,584 KB
testcase_09 AC 62 ms
23,604 KB
testcase_10 AC 62 ms
21,584 KB
testcase_11 AC 62 ms
23,580 KB
testcase_12 AC 62 ms
23,608 KB
testcase_13 AC 62 ms
21,492 KB
testcase_14 AC 83 ms
23,436 KB
testcase_15 AC 73 ms
24,788 KB
testcase_16 AC 88 ms
24,448 KB
testcase_17 AC 75 ms
22,708 KB
testcase_18 AC 83 ms
22,480 KB
testcase_19 AC 81 ms
23,236 KB
testcase_20 AC 92 ms
27,160 KB
testcase_21 AC 69 ms
21,996 KB
testcase_22 AC 75 ms
22,700 KB
testcase_23 AC 89 ms
28,920 KB
testcase_24 AC 91 ms
24,920 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;

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 != 0; --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