結果

問題 No.467 隠されていたゲーム
コンテスト
ユーザー jj
提出日時 2017-01-29 02:09:11
言語 Fortran
(gFortran 15.2.0)
コンパイル:
gfortran _filename_ -O2 -o ./a.out
実行:
./a.out
結果
WA  
実行時間 -
コード長 444 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 196 ms
コンパイル使用メモリ 39,552 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2026-05-29 20:43:33
合計ジャッジ時間 4,509 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

program main
  implicit none
  integer::N
  integer*8,allocatable::d(:)
  integer::x,y,maxd,maxxy,count
  read *,n
  allocate(d(n))
  read *,d
  read *,x,y
  x = abs(x)
  y = abs(y)
  maxd = MAXVAL(d)
  maxxy= MAX(x,y)
  count = maxxy/maxd
  if(maxxy.eq.0) then
     print '(i0)', 0
  else if(ANY(maxxy.eq.d)) then
     print '(i0)', 1
  else
     count = (maxxy - 2*maxd + maxd - 1)/maxd
     print '(i0)', count + 2
  end if
end program main
0