結果

問題 No.231 めぐるはめぐる (1)
コンテスト
ユーザー jj
提出日時 2016-07-28 20:12:02
言語 Fortran
(gFortran 15.2.0)
コンパイル:
gfortran _filename_ -O2 -o ./a.out
実行:
./a.out
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 571 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,650 ms
コンパイル使用メモリ 39,900 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2026-05-08 07:49:00
合計ジャッジ時間 2,623 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_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