結果

問題 No.231 めぐるはめぐる (1)
コンテスト
ユーザー jj
提出日時 2016-07-28 20:12:02
言語 Fortran
(gFortran 16.1.0)
コンパイル:
gfortran-16 _filename_ -O2 -o ./a.out
実行:
./a.out
結果
AC  
実行時間 1 ms / 1,000 ms
+ 136µs
コード長 571 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,721 ms
コンパイル使用メモリ 41,732 KB
実行使用メモリ 9,980 KB
最終ジャッジ日時 2026-09-20 23:36:38
合計ジャッジ時間 2,904 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

  integer,allocatable::GD(:,:)
  integer,parameter::experiment=30000,time=6
  integer::N,maxindx,i,maxexp=-1,temp
  logical::pos=.false.

  read *,N
  allocate(GD(2,N))
  read *,GD

  do i=1, N
     temp = GD(1,i)-experiment*GD(2,i)
     if (temp.gt.maxexp) then
        maxexp = temp
        maxindx = i
        if(maxexp.ge.experiment*100/time) then
           pos = .true.
           exit
        endif
     end if
  end do

  if(pos) then
     print '(a)',"YES"
     do i=1,6
        print '(i0)',maxindx
     end do
  else
     print '(a)',"NO"
  end if
end program
0