結果

問題 No.232 めぐるはめぐる (2)
コンテスト
ユーザー 👑 Kazun
提出日時 2021-06-19 01:59:52
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 52 ms / 1,000 ms
コード長 560 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 208 ms
コンパイル使用メモリ 85,580 KB
実行使用メモリ 93,520 KB
最終ジャッジ日時 2026-03-07 04:11:38
合計ジャッジ時間 2,356 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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

if T==1:
    if (A,B)==(1,0):
        print("YES")
        print("^")
    elif (A,B)==(0,1):
        print("YES")
        print(">")
    elif (A,B)==(1,1):
        print("YES")
        print("^>")
    else:
        print("NO")
    exit()

if A>T or B>T:
    exit(print("NO"))

X=["^"]*A
while len(X)<T-1:
    X.append("v")
    X.append("^")

if len(X)==T-1:
    X.insert(0,"")

Y=[">"]*B
while len(Y)<T-1:
    Y.append("<")
    Y.append(">")

if len(Y)==T-1:
    Y.insert(1,"")

print("YES")
for x,y in zip(X,Y):
    print(x+y)
0