結果
問題 | No.275 中央値を求めよ |
ユーザー |
|
提出日時 | 2024-05-03 12:13:52 |
言語 | Fortran (gFortran 14.2.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 656 bytes |
コンパイル時間 | 373 ms |
コンパイル使用メモリ | 32,760 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-24 12:06:07 |
合計ジャッジ時間 | 1,397 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 38 |
ソースコード
program yukicoder_746use, intrinsic :: iso_fortran_envimplicit noneinteger(int32), parameter :: maxi = 1000integer(int32) :: n, cnts(-maxi:maxi), cinteger(int32), allocatable :: arr(:)integer(int32) :: i, jread(input_unit, *) nallocate(arr(n))read(input_unit, *) arr(:)cnts(:) = 0do i = 1, ncnts(arr(i)) = cnts(arr(i)) + 1end doc = 0do i = -maxi, maxido j = 1, cnts(i)c = c + 1arr(c) = iend doend doassociate(half_1 => (n + 1) / 2, half_2 => (n + 2) / 2)write(output_unit, '(g0)') real(arr(half_1) + arr(half_2), real64) / 2end associateend program yukicoder_746