結果

問題 No.975 ミスターマックスバリュ
ユーザー GafoGafoGafoGafo
提出日時 2020-02-04 21:19:28
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 876 bytes
コンパイル時間 1,292 ms
コンパイル使用メモリ 29,760 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-21 06:34:27
合計ジャッジ時間 1,939 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,348 KB
testcase_01 AC 0 ms
4,348 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 1 ms
4,348 KB
testcase_05 AC 0 ms
4,348 KB
testcase_06 AC 1 ms
4,348 KB
testcase_07 WA -
testcase_08 AC 7 ms
4,348 KB
testcase_09 WA -
testcase_10 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

int main()
{
    int a,b,c;
    int bb[100000], cc[100000];
    int box1 = 0, box2 = 0;
    
    scanf("%d %d %d", &a,&b,&c);
    
    for(int i = 0; i < b; i++)
    {
        scanf("%d", &bb[i]);
    }
    
    for(int j = 0; j < c; j++)
    {
        scanf("%d", &cc[j]);
    }
    
    for(int ii = 0; ii < b; ii++)
    {
        if(bb[ii] == a)
        {
            box1 = 1;
        }
        else
        {
            box1 = -1;
        }
    }
    
    for(int jj = 0; jj < c; jj++)
    {
        if(cc[jj] == a)
        {
            box2 = 1;
        }
        else
        {
            box2 = -1;
        }
    }
    
    if(box1 == 1)
    {
        printf("MrMax\n");
    }
    
    else if(box2 == 1)
    {
        printf("MaxValu\n");
    }
    
    else if(box1 == -1 && box2 == -1)
    {
        printf("-1\n");
    }
    
    return 0;
}
0