結果

問題 No.232 めぐるはめぐる (2)
ユーザー 🍡yurahuna🍡yurahuna
提出日時 2016-01-24 12:51:51
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 730 bytes
コンパイル時間 130 ms
コンパイル使用メモリ 11,900 KB
実行使用メモリ 10,260 KB
最終ジャッジ日時 2023-10-21 13:56:17
合計ジャッジ時間 2,622 ms
ジャッジサーバーID
(参考情報)
judge9 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 87 ms
10,260 KB
testcase_01 AC 87 ms
10,240 KB
testcase_02 AC 87 ms
10,260 KB
testcase_03 AC 88 ms
10,260 KB
testcase_04 AC 30 ms
10,188 KB
testcase_05 AC 29 ms
10,188 KB
testcase_06 AC 30 ms
10,188 KB
testcase_07 AC 29 ms
10,188 KB
testcase_08 AC 69 ms
10,260 KB
testcase_09 AC 29 ms
10,188 KB
testcase_10 WA -
testcase_11 AC 28 ms
10,188 KB
testcase_12 AC 30 ms
10,188 KB
testcase_13 WA -
testcase_14 AC 29 ms
10,188 KB
testcase_15 AC 29 ms
10,188 KB
testcase_16 AC 31 ms
10,188 KB
testcase_17 AC 30 ms
10,188 KB
testcase_18 AC 32 ms
10,200 KB
testcase_19 AC 31 ms
10,188 KB
testcase_20 AC 29 ms
10,188 KB
testcase_21 AC 29 ms
10,188 KB
testcase_22 AC 30 ms
10,188 KB
testcase_23 AC 29 ms
10,188 KB
testcase_24 AC 30 ms
10,188 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T, A, B = map(int, input().split())
first_arrive = max(A, B)
rem = T - first_arrive
if rem < 0 or (rem == 1 and A == B == 0):
    print('NO')
else:
    print('YES')
    if rem % 2 == 1:
        if A == 0:
            print('v')
            A += 1
        elif B== 0:
            print('<')
            B += 1
        elif A < B:
            print('^')
            A -= 1
        else:
            print('^')
            A -= 1
    
    diag = min(A, B)
    for _ in range(diag):
        print('^>')
    
    if A > B:
        for _ in range(first_arrive - diag):
            print('^')
    else:
        for _ in range(first_arrive - diag):
            print('>')

    for _ in range(rem//2):
        print('>')
        print('<')
0