結果

問題 No.182 新規性の虜
ユーザー con
提出日時 2019-06-17 21:48:40
言語 Fortran
(gFortran 14.2.0)
結果
TLE  
実行時間 -
コード長 464 bytes
コンパイル時間 1,352 ms
コンパイル使用メモリ 32,452 KB
実行使用メモリ 13,632 KB
最終ジャッジ日時 2024-11-28 23:48:32
合計ジャッジ時間 67,391 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 19 TLE * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

implicit none
integer(8) i,N,j,d
integer(8),allocatable :: A(:)
integer(8),allocatable :: B(:)
integer(8),allocatable :: C(:)
read(*,*) N
allocate (A(1:N))
allocate (B(1:N))
allocate (C(1:N))
A=0
B=0
C=0
d=0
read(*,*) (A(i),i=1,N)
do i=1,N
    C(i)=maxval(A)
    A(maxloc(A))=0
end do
do i=1,N-1
    if (C(i)==C(i+1)) then
        B(i)=B(i)-1
        B(i+1)=B(i+1)-1
    end if
end do
do i=1,N
    if (B(i)==0) then
        d=d+1
    end if
end do
write(*,*) d
end
0