結果

問題 No.504 ゲーム大会(ランキング)
ユーザー jjjj
提出日時 2017-04-21 22:48:54
言語 Fortran
(gFortran 13.2.0)
結果
AC  
実行時間 53 ms / 2,000 ms
コード長 526 bytes
コンパイル時間 445 ms
コンパイル使用メモリ 27,120 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-27 11:32:29
合計ジャッジ時間 1,632 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 53 ms
4,376 KB
testcase_08 AC 50 ms
4,376 KB
testcase_09 AC 51 ms
4,380 KB
testcase_10 AC 48 ms
4,380 KB
testcase_11 AC 50 ms
4,376 KB
testcase_12 AC 45 ms
4,376 KB
testcase_13 AC 38 ms
4,380 KB
testcase_14 AC 50 ms
4,380 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.f90:25:30:

     write(cformat(5:9),'(i0)'),size(array)-1
                              1
Warning: Legacy Extension: Comma before i/o item list at (1)

ソースコード

diff #

program main
  implicit none
  integer::N,k,i
  integer,allocatable::a(:)
  read *,N
  allocate(a(N))
  read *,a
  if(N.eq.1) then
      print '("1")'
      return
  endif
  k = 1
  do i=2,N
     if(a(1).lt.a(i)) then
        k = k + 1
     end if
     a(i) = k
  end do
  a(1) = 1
  call aprinter(a)
contains
  subroutine aprinter(array)
    integer*4::array(:)
    character*32::cformat='(i0,     (/,i0),i0)'
    write(cformat(5:9),'(i0)'),size(array)-1
    write(*,cformat) array
  end subroutine aprinter
end program main
0