結果

問題 No.975 ミスターマックスバリュ
ユーザー ぽまぽま
提出日時 2020-01-31 21:28:42
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 565 bytes
コンパイル時間 1,065 ms
コンパイル使用メモリ 28,192 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-17 08:43:36
合計ジャッジ時間 1,650 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <stdio.h>

int main(void) {
    int x, n, m, a, flag = -1;
    scanf("%d %d %d", &x, &n, &m);
    for(int i = 0; i < n; i++) {
        scanf("%d", &a);
        if(a == x) flag = 0;
    }
    for(int i = 0; i < m; i++) {
        scanf("%d", &a);
        if(a == x) {
            if(flag == 0) {
                flag = 2;
            }
            flag = 1;
        }
    }
    if(flag == -1) printf("-1\n");
    else if(flag == 0) printf("MrMax\n");
    else if(flag == 1) printf("MaxValue\n");
    else if(flag == 2) printf("MrMaxValue\n");
    return 0;
}
0