結果

問題 No.975 ミスターマックスバリュ
ユーザー GinFizz1185GinFizz1185
提出日時 2020-02-04 06:58:11
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 40 ms / 2,000 ms
コード長 1,271 bytes
コンパイル時間 834 ms
コンパイル使用メモリ 108,768 KB
実行使用メモリ 26,612 KB
最終ジャッジ日時 2023-10-19 22:56:20
合計ジャッジ時間 1,906 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
24,172 KB
testcase_01 AC 26 ms
24,236 KB
testcase_02 AC 26 ms
24,236 KB
testcase_03 AC 25 ms
24,172 KB
testcase_04 AC 26 ms
24,236 KB
testcase_05 AC 30 ms
24,580 KB
testcase_06 AC 30 ms
24,572 KB
testcase_07 AC 30 ms
24,580 KB
testcase_08 AC 40 ms
26,612 KB
testcase_09 AC 25 ms
24,172 KB
testcase_10 AC 25 ms
24,172 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

namespace yukicode
{
    class No975
    {
        static void Main(string[] args)
        {
            int mrNum = 0, valueNum = 0, resMr = -1, resVal = -1;
            string reqCode  = "";
            string input;
            input = Console.ReadLine();

            string[] firstInfo = input.Split(" ");

            if(3 == firstInfo.Length)
            {
                reqCode = firstInfo[0];
                mrNum = int.Parse(firstInfo[1]);
                valueNum = int.Parse(firstInfo[2]);
            }

            input = Console.ReadLine();
            string[] secandInfo = input.Split(" ");
            input = Console.ReadLine();
            string[] thirdInfo = input.Split(" ");

            resMr = Array.IndexOf(secandInfo, reqCode);
            resVal = Array.IndexOf(thirdInfo, reqCode);

            if((resMr >= 0) && (resVal >= 0))
            {
                Console.WriteLine("MrMaxValu");
            }
            else if (resMr >= 0)
            {
                Console.WriteLine("MrMax");
            }
            else if (resVal >= 0)
            {
                Console.WriteLine("MaxValu");
            }
            else
            {
                Console.WriteLine("-1");
            }
        }
    }
}
0