結果
問題 |
No.975 ミスターマックスバリュ
|
ユーザー |
|
提出日時 | 2020-01-31 22:20:43 |
言語 | Fortran (gFortran 14.2.0) |
結果 |
AC
|
実行時間 | 10 ms / 2,000 ms |
コード長 | 730 bytes |
コンパイル時間 | 1,131 ms |
コンパイル使用メモリ | 32,768 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-17 08:43:12 |
合計ジャッジ時間 | 1,602 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 9 |
ソースコード
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