結果

問題 No.232 めぐるはめぐる (2)
ユーザー TawaraTawara
提出日時 2015-06-27 00:42:07
言語 Python2
(2.7.18)
結果
RE  
実行時間 -
コード長 925 bytes
コンパイル時間 743 ms
コンパイル使用メモリ 6,520 KB
実行使用メモリ 8,828 KB
最終ジャッジ日時 2023-09-22 02:54:04
合計ジャッジ時間 3,865 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 54 ms
8,828 KB
testcase_02 WA -
testcase_03 AC 43 ms
8,824 KB
testcase_04 AC 11 ms
5,904 KB
testcase_05 RE -
testcase_06 RE -
testcase_07 AC 11 ms
5,968 KB
testcase_08 WA -
testcase_09 AC 10 ms
6,052 KB
testcase_10 WA -
testcase_11 RE -
testcase_12 WA -
testcase_13 RE -
testcase_14 WA -
testcase_15 RE -
testcase_16 AC 10 ms
6,020 KB
testcase_17 WA -
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 AC 11 ms
5,936 KB
testcase_22 AC 12 ms
6,028 KB
testcase_23 AC 11 ms
5,892 KB
testcase_24 AC 10 ms
5,956 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

dh = {1:"^", -1:"v"}
dv = {1:">", -1:"<"}
T, A, B = map(int,raw_input().split(" "))
absA = abs(A)
absB = abs(B)
slant = min(absA,absB)
short = slant + abs(absA-absB)
if short > T:
	print "NO"
else:
	print "YES"
	hor = A / absA
	ver = B / absB
	if short == slant:
		for i in range(slant-1):
			print dh[hor]+dv[ver]
		for i in range((T - short) % 2):
			print "^"
			print "v"
		if (T - short) % 2 == 0: 
			print dh[hor]+dv[ver]
		else:
			print dh[hor]
			print dv[ver]
	else:
		for i in range(slant):
			print dh[hor]+dv[ver]
		if absA > absB:
			for i in range(short-slant-1):
				print dh[hor]
		else:
			for i in range(short-slant-1):
				print dh[ver]
		for i in range((T - short) % 2):
			print "^"
			print "v"
		if (T - short) % 2 == 0:
			print dh[hor] if absA > absB else dh[ver]
		else:
			if absA > absB:
				print dh[ver]
				print dh[hor]+dh[ver*(-1)]
			else:
				print dh[hor]
				print dh[ver]+dh[hor*(-1)]
0