結果
| 問題 |
No.232 めぐるはめぐる (2)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-08-22 16:26:09 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 1,696 bytes |
| コンパイル時間 | 527 ms |
| コンパイル使用メモリ | 82,792 KB |
| 実行使用メモリ | 83,112 KB |
| 最終ジャッジ日時 | 2024-08-22 16:26:13 |
| 合計ジャッジ時間 | 3,831 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 RE * 2 |
ソースコード
import sys
import math
import bisect
from heapq import heapify, heappop, heappush
from collections import deque, defaultdict, Counter
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product
sys.set_int_max_str_digits(10 ** 6)
sys.setrecursionlimit(1000000)
MOD = 10 ** 9 + 7
MOD99 = 998244353
input = lambda: sys.stdin.readline().strip()
NI = lambda: int(input())
NMI = lambda: map(int, input().split())
NLI = lambda: list(NMI())
SI = lambda: input()
SMI = lambda: input().split()
SLI = lambda: list(SMI())
EI = lambda m: [NLI() for _ in range(m)]
def main():
T, A, B = NMI()
if T < max(A, B):
print("NO")
return
if A >= B:
ans = []
for i in range(A-B):
ans.append("^")
for i in range(B):
ans.append("^>")
if (T - A) % 2:
x = ans.pop()
if x == "^":
ans.append(">")
ans.append("<^")
else:
ans.append(">")
ans.append("^")
for i in range((T-A)//2):
ans.append(">")
ans.append("<")
else:
ans = []
for i in range(B-A):
ans.append(">")
for i in range(A):
ans.append("^>")
if (T - B) % 2:
x = ans.pop()
if x == ">":
ans.append("v")
ans.append(">^")
else:
ans.append(">")
ans.append("^")
for i in range((T - B) // 2):
ans.append(">")
ans.append("<")
print("YES")
for s in ans:
print(s)
if __name__ == "__main__":
main()