結果

問題 No.232 めぐるはめぐる (2)
ユーザー roiti46roiti46
提出日時 2015-06-26 23:21:41
言語 Python2
(2.7.18)
結果
AC  
実行時間 92 ms / 1,000 ms
コード長 760 bytes
コンパイル時間 40 ms
コンパイル使用メモリ 6,652 KB
実行使用メモリ 11,376 KB
最終ジャッジ日時 2023-10-12 13:34:15
合計ジャッジ時間 2,152 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 92 ms
11,220 KB
testcase_01 AC 92 ms
11,196 KB
testcase_02 AC 91 ms
11,376 KB
testcase_03 AC 91 ms
11,268 KB
testcase_04 AC 12 ms
6,448 KB
testcase_05 AC 11 ms
6,012 KB
testcase_06 AC 11 ms
6,004 KB
testcase_07 AC 12 ms
5,992 KB
testcase_08 AC 67 ms
9,768 KB
testcase_09 AC 12 ms
6,268 KB
testcase_10 AC 11 ms
6,048 KB
testcase_11 AC 11 ms
5,856 KB
testcase_12 AC 11 ms
5,908 KB
testcase_13 AC 11 ms
5,856 KB
testcase_14 AC 11 ms
5,936 KB
testcase_15 AC 11 ms
5,888 KB
testcase_16 AC 11 ms
6,052 KB
testcase_17 AC 10 ms
6,008 KB
testcase_18 AC 11 ms
5,900 KB
testcase_19 AC 10 ms
5,996 KB
testcase_20 AC 11 ms
6,044 KB
testcase_21 AC 11 ms
6,012 KB
testcase_22 AC 10 ms
5,860 KB
testcase_23 AC 11 ms
5,932 KB
testcase_24 AC 11 ms
6,000 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T, A, B = map(int, raw_input().split())

ans = [""] * T
if A > T or B > T:
        print "NO"
else:
        for i in xrange(T):
                if (A == 0 and i != T - 1) or A < 0:
                        ans[i] += "v"
                        A += 1
                elif A > 0:
                        ans[i] += "^"
                        A -= 1
        for i in xrange(T - 1, -1, -1):
                if (B == 0 and i != 0) or B < 0:
                        ans[i] += "<"
                        B += 1
                elif B > 0:
                        ans[i] += ">"
                        B -= 1

        if "" not in ans:
                print "YES"
                for a in ans:
                        print a
        else:
                print "NO"
0