結果

問題 No.975 ミスターマックスバリュ
ユーザー jj1gujjj1guj
提出日時 2020-01-31 22:20:43
言語 Fortran
(gFortran 13.2.0)
結果
AC  
実行時間 12 ms / 2,000 ms
コード長 730 bytes
コンパイル時間 2,214 ms
コンパイル使用メモリ 32,704 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-17 10:17:39
合計ジャッジ時間 3,067 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

program y235A
    implicit none
    integer(8)::X,N,M,i
    integer(8),allocatable,dimension(:)::A,B
    integer(8)::flg=0
    read(5,*)X,N,M
    allocate(A(N))
    allocate(B(M))
    read(5,*)(A(i),i=1,N)
    read(5,*)(B(i),i=1,M)

    do i=1,N
        if(A(i)==X)then
            flg=1
        end if
    end do

    do i=1,M
        if(B(i)==X)then
            if(flg==0)then
                flg=2
            else if(flg==1)then
                flg=3
            end if
        end if
    end do

    if(flg==0)then
        print'(i0)',-1
    else if(flg==1)then
        print'(A)',"MrMax"
    else if(flg==2)then
        print'(A)',"MaxValu"
    else if(flg==3)then
        print'(A)',"MrMaxValu"
    end if
end program y235A
0