結果
| 問題 | No.504 ゲーム大会(ランキング) | 
| コンテスト | |
| ユーザー |  jj | 
| 提出日時 | 2017-04-21 22:48:54 | 
| 言語 | Fortran (gFortran 14.2.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 36 ms / 2,000 ms | 
| コード長 | 526 bytes | 
| コンパイル時間 | 145 ms | 
| コンパイル使用メモリ | 32,384 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-07-20 05:38:09 | 
| 合計ジャッジ時間 | 1,290 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 13 | 
コンパイルメッセージ
Main.f90:25:30:
   25 |     write(cformat(5:9),'(i0)'),size(array)-1
      |                              1
Warning: Legacy Extension: Comma before i/o item list at (1)
            
            ソースコード
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
            
            
            
        