結果

問題 No.482 あなたの名は
ユーザー jjjj
提出日時 2017-02-10 22:29:33
言語 Fortran
(gFortran 13.2.0)
結果
WA  
実行時間 -
コード長 507 bytes
コンパイル時間 214 ms
コンパイル使用メモリ 27,072 KB
実行使用メモリ 11,436 KB
最終ジャッジ日時 2023-08-27 22:08:34
合計ジャッジ時間 4,826 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
8,840 KB
testcase_01 AC 2 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,376 KB
testcase_07 WA -
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 1 ms
4,376 KB
testcase_11 AC 2 ms
4,380 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 2 ms
4,376 KB
testcase_15 TLE -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

program main
  implicit none
  integer*8::N,K,i,j,count,tmp
  integer*8,allocatable::D(:)
  data count/0/
  read *,N,K
  allocate(D(N))
  read *,D

  do i=1, N-1
     do j=1, N-i
        if(D(j).gt.D(j+1)) then
           tmp = D(j+1)
           D(j+1) = D(j)
           D(j) = tmp
           count = count + 1
        end if
     end do
  end do
  if(count .gt. K ) then
     print '("NO")'
  else if(MOD(count,2).eq.MOD(K,2)) then
     print '("YES")'
  else
     print '("NO")'
  end if
end program main
0