結果

問題 No.232 めぐるはめぐる (2)
ユーザー lloyzlloyz
提出日時 2023-09-16 19:40:39
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 1,166 bytes
コンパイル時間 359 ms
コンパイル使用メモリ 87,016 KB
実行使用メモリ 77,816 KB
最終ジャッジ日時 2023-09-16 19:40:59
合計ジャッジ時間 5,325 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 96 ms
77,120 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 77 ms
71,244 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 74 ms
71,372 KB
testcase_08 WA -
testcase_09 AC 76 ms
71,232 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 76 ms
71,348 KB
testcase_14 WA -
testcase_15 AC 72 ms
71,392 KB
testcase_16 AC 73 ms
71,388 KB
testcase_17 AC 75 ms
71,240 KB
testcase_18 WA -
testcase_19 AC 73 ms
71,248 KB
testcase_20 WA -
testcase_21 AC 76 ms
71,460 KB
testcase_22 AC 75 ms
71,368 KB
testcase_23 AC 76 ms
71,264 KB
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

t, a, b = map(int, input().split())
if a > t or b > t:
    print("NO")
    exit()
print("YES")
aa = t - (t - a) % 2
bb = t - (t - b) % 2
ca, cb = 0, 0
if aa < t and bb < t:
    for i in range(t):
        if i == 0:
            print('^')
            ca += 1
        elif i == t - 1:
            if cb < b:
                print('>')
            else:
                print('<')
            cb += 1
        else:
            res = ''
            if ca <= a:
                res += '^'
            else:
                res += 'v'
            if cb <= b:
                res += '>'
            else:
                res += '<'
            print(res)
            ca += 1
            cb += 1
else:
    for i in range(t):
        res = ''
        if i == 0:
            if a == t:
                res += '^'
                ca += 1
            if b == t:
                res += '>'
                cb += 1
        else:
            if ca <= a:
                res += '^'
            else:
                res += 'v'
            if cb <= b:
                res += '>'
            else:
                res += '<'
            ca += 1
            cb += 1
        print(res)
0