結果

問題 No.975 ミスターマックスバリュ
ユーザー bluemeganebluemegane
提出日時 2020-02-12 07:12:06
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 45 ms / 2,000 ms
コード長 931 bytes
コンパイル時間 3,929 ms
コンパイル使用メモリ 110,444 KB
実行使用メモリ 27,044 KB
最終ジャッジ日時 2024-04-10 07:07:26
合計ジャッジ時間 1,824 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 24 ms
23,924 KB
testcase_01 AC 23 ms
21,812 KB
testcase_02 AC 24 ms
24,176 KB
testcase_03 AC 24 ms
24,044 KB
testcase_04 AC 24 ms
26,088 KB
testcase_05 AC 29 ms
26,568 KB
testcase_06 AC 30 ms
26,680 KB
testcase_07 AC 30 ms
22,452 KB
testcase_08 AC 45 ms
27,044 KB
testcase_09 AC 24 ms
24,044 KB
testcase_10 AC 25 ms
26,212 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

public class Hello
{
    static void Main()
    {
        string[] line = Console.ReadLine().Trim().Split(' ');
        var x = int.Parse(line[0]);
        var n = int.Parse(line[1]);
        var m = int.Parse(line[2]);
        line = Console.ReadLine().Trim().Split(' ');
        var a = Array.ConvertAll(line, int.Parse);
        line = Console.ReadLine().Trim().Split(' ');
        var b = Array.ConvertAll(line, int.Parse);
        Console.WriteLine(getAns(x, n, m, a, b));
    }
    static bool search(int n, int[] a, int t)
    {
        for (int i = 0; i < n; i++)
            if (a[i] == t) return true;
        return false;
    }
    static string getAns(int x, int n, int m, int[] a, int[] b)
    {
        var aa = search(n, a, x);
        var bb = search(m, b, x);
        if (aa && bb) return "MrMaxValu";
        if (aa) return "MrMax";
        if (bb) return "MaxValu";
        return "-1";
    }
}

0