結果

問題 No.232 めぐるはめぐる (2)
ユーザー mkawa2mkawa2
提出日時 2019-12-25 17:52:26
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 906 ms / 1,000 ms
コード長 1,021 bytes
コンパイル時間 1,049 ms
コンパイル使用メモリ 10,996 KB
実行使用メモリ 53,316 KB
最終ジャッジ日時 2023-10-12 13:51:11
合計ジャッジ時間 8,339 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 906 ms
36,756 KB
testcase_01 AC 191 ms
36,508 KB
testcase_02 AC 190 ms
36,380 KB
testcase_03 AC 192 ms
36,540 KB
testcase_04 AC 130 ms
29,684 KB
testcase_05 AC 132 ms
29,640 KB
testcase_06 AC 129 ms
29,644 KB
testcase_07 AC 130 ms
29,656 KB
testcase_08 AC 173 ms
34,592 KB
testcase_09 AC 130 ms
29,852 KB
testcase_10 AC 130 ms
29,580 KB
testcase_11 AC 131 ms
29,656 KB
testcase_12 AC 128 ms
29,656 KB
testcase_13 AC 131 ms
29,636 KB
testcase_14 AC 134 ms
29,556 KB
testcase_15 AC 131 ms
29,636 KB
testcase_16 AC 130 ms
29,700 KB
testcase_17 AC 129 ms
29,636 KB
testcase_18 AC 127 ms
29,692 KB
testcase_19 AC 127 ms
29,668 KB
testcase_20 AC 128 ms
29,624 KB
testcase_21 AC 128 ms
29,536 KB
testcase_22 AC 128 ms
29,596 KB
testcase_23 AC 126 ms
29,660 KB
testcase_24 AC 127 ms
53,316 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from bisect import *
from math import *
from collections import *
from heapq import *
from random import *
import numpy as np
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MF(): return map(float, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LF(): return list(map(float, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

def main():
    n,y,x=MI()
    if max(x,y)>n or (n,y,x)==(1,0,0):
        print("NO")
        exit()
    ans=[""]*n
    r=x+(n-x)//2
    l=(n-x)//2
    u=y+(n-y)//2
    d=(n-y)//2
    for i in range(r):
        ans[i]=">"
    for i in range(r,r+l):
        ans[i]="<"
    for i in range(n-1,n-1-u,-1):
        ans[i]+="^"
    for i in range(n-1-u,n-1-u-d,-1):
        ans[i]+="v"
    print("YES")
    for s in ans:
        print(s)

main()
0