結果

問題 No.232 めぐるはめぐる (2)
ユーザー jjjj
提出日時 2016-10-23 22:32:39
言語 Fortran
(gFortran 13.2.0)
結果
WA  
実行時間 -
コード長 642 bytes
コンパイル時間 300 ms
コンパイル使用メモリ 31,872 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-05-03 04:57:08
合計ジャッジ時間 2,248 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

program main
  implicit none
  integer::T,A,B,AA,BB
  integer::i,tmp
  read *,T,A,B

  if(MAX(A,B).gt.T) then
     print '(a)', "NO"
     return
  else
    print '(a)', "YES"
  end if

  AA = A-1
  BB = B-1

  do i=1,MIN(AA,BB)
     print '(a)',"^>"
  end do

  if(AA.gt.BB) then
     do i=BB+1,AA
        print '(a)',"^"
     end do
  else
     do i=AA+1,BB
        print '(a)',">"
     end do
  end if

  tmp = T-MAX(AA,BB)-1
  do i=1,tmp/2
     print '(a)',"^"
     print '(a)',"v"
  end do
  if(MOD(tmp,2).eq.1) then
     print '(a)',"^"
     print '(a)',">"
     return
  else
     print '(a)',">^"
     return
  end if
end program main
0