結果

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

テストケース

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

ソースコード

diff #

#include <stdio.h>

int main()
{
    int a,b,c;
    int bb[100000], cc[100000];
    int box1 = 0, box2 = 0;
    
    scanf("%d", &a);
    scanf("%d", &b);
    scanf("%d", &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;
        }
    }

    if(box1 == 0)
    {
	    box1 = -1;
    }
    
    for(int jj = 0; jj < c; jj++)
    {
        if(cc[jj] == a)
        {
            box2 = 1;
        }
    }

    if(box2 == 0)
    {
	    box2 = -1;
    }

    else if((box1 == 1) && (box2 == 1))
    {
            printf("MrMaxValu\n");
	    return 0;
    }

    if(box1 == 1)
    {
        printf("MrMax\n");
	return 0;
    }
    
    else if(box2 == 1)
    {
        printf("MaxValu\n");
	return 0;
    }

    else if((box1 == -1) && (box2 == -1))
    {
        printf("-1\n");
	return 0;
    }
    
    return 0;
}
0