結果

問題 No.232 めぐるはめぐる (2)
ユーザー lloyz
提出日時 2023-09-16 19:46:49
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 1,639 bytes
コンパイル時間 247 ms
コンパイル使用メモリ 82,924 KB
実行使用メモリ 76,352 KB
最終ジャッジ日時 2024-07-03 19:08:49
合計ジャッジ時間 2,873 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 19 WA * 3
権限があれば一括ダウンロードができます

ソースコード

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:
if (cb - b) % 2 == 0:
res += '>'
else:
res += '<'
cb += 1
else:
res = ''
if ca < a:
res += '^'
else:
if (ca - a) % 2 == 0:
res += '^'
else:
res += 'v'
if cb < b:
res += '>'
else:
if (cb - b) % 2 == 0:
res += '>'
else:
res += '<'
print(res)
ca += 1
cb += 1
else:
for i in range(t):
res = ''
if i == 0:
if aa == t:
res += '^'
ca += 1
if bb == t:
res += '>'
cb += 1
else:
if ca < a:
res += '^'
else:
if (ca - a) % 2 == 0:
res += '^'
else:
res += 'v'
if cb < b:
res += '>'
else:
if (cb - b) % 2 == 0:
res += '>'
else:
res += '<'
ca += 1
cb += 1
print(res)
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
0