結果

問題 No.182 新規性の虜
ユーザー concon
提出日時 2019-06-17 21:45:26
言語 Fortran
(gFortran 13.2.0)
結果
WA  
実行時間 -
コード長 357 bytes
コンパイル時間 2,495 ms
コンパイル使用メモリ 32,640 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-05-06 15:41:20
合計ジャッジ時間 3,940 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 AC 1 ms
5,376 KB
testcase_05 AC 1 ms
5,376 KB
testcase_06 AC 1 ms
5,376 KB
testcase_07 AC 1 ms
5,376 KB
testcase_08 AC 14 ms
5,376 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 1 ms
5,376 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 1 ms
5,376 KB
testcase_24 AC 19 ms
5,376 KB
testcase_25 AC 15 ms
5,376 KB
testcase_26 AC 4 ms
5,376 KB
testcase_27 AC 1 ms
5,376 KB
evil01.txt AC 24 ms
5,376 KB
evil02.txt AC 24 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

implicit none
integer(8) i,N,j,c
integer(8),allocatable :: A(:)
integer(8),allocatable :: B(:)
read(*,*) N
allocate (A(1:N))
allocate (B(1:N))
A=0
B=0
c=0
read(*,*) (A(i),i=1,N)
do i=1,N-1
    if (A(i)==A(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
        c=c+1
    end if
end do
write(*,*) c
end
0