結果

問題 No.975 ミスターマックスバリュ
ユーザー Keiya WatanabeKeiya Watanabe
提出日時 2020-03-21 02:04:03
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 88 ms / 2,000 ms
コード長 984 bytes
コンパイル時間 1,169 ms
コンパイル使用メモリ 66,168 KB
実行使用メモリ 23,976 KB
最終ジャッジ日時 2023-08-22 07:42:23
合計ジャッジ時間 2,480 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
23,912 KB
testcase_01 AC 61 ms
21,784 KB
testcase_02 AC 61 ms
23,928 KB
testcase_03 AC 61 ms
21,808 KB
testcase_04 AC 61 ms
23,976 KB
testcase_05 AC 68 ms
19,904 KB
testcase_06 AC 70 ms
21,928 KB
testcase_07 AC 70 ms
21,940 KB
testcase_08 AC 88 ms
23,952 KB
testcase_09 AC 62 ms
21,896 KB
testcase_10 AC 61 ms
23,804 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

public class Program
{
    private static IEnumerable<int> GetLine()
    {
        return Console.ReadLine().Split(" ").Select(x => Convert.ToInt32(x));
    }

    public static void Main()
    {
        IEnumerable<int> inputs = Program.GetLine();
        int wantedNum = inputs.First();
        IEnumerable<int> mrMaxList = Program.GetLine();
        IEnumerable<int> maxValuList = Program.GetLine();

        bool isMrMax = mrMaxList.Contains(wantedNum);
        bool isMaxValu = maxValuList.Contains(wantedNum);

        if (isMrMax && isMaxValu)
        {
            Console.WriteLine("MrMaxValu");
        }
        else if (isMrMax)
        {
            Console.WriteLine("MrMax");
        }
        else if (isMaxValu)
        {
            Console.WriteLine("MaxValu");
        }
        else
        {
            Console.WriteLine("-1");
        }
    }
}

// Program.Main();
0