結果

問題 No.331 CodeRunnerでやれ
ユーザー vwxyzvwxyz
提出日時 2023-12-26 06:56:27
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 506 bytes
コンパイル時間 383 ms
コンパイル使用メモリ 11,904 KB
実行使用メモリ 32,172 KB
平均クエリ数 8321.35
最終ジャッジ日時 2023-12-26 06:56:47
合計ジャッジ時間 17,999 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 209 ms
26,120 KB
testcase_01 AC 201 ms
26,120 KB
testcase_02 AC 216 ms
26,120 KB
testcase_03 AC 462 ms
26,376 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 342 ms
26,120 KB
testcase_07 WA -
testcase_08 AC 323 ms
26,120 KB
testcase_09 AC 248 ms
26,120 KB
testcase_10 WA -
testcase_11 AC 1,276 ms
27,016 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 4,668 ms
32,172 KB
testcase_15 WA -
testcase_16 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
sys.setrecursionlimit(10**7)

seen={(0,0)}
dx=[0,1,0,-1]
dy=[1,0,-1,0]


def solve(x,y,d):
    seen.add((x,y))
    for _ in range(4):
        le=input()
        if le=="Merry Christmas!":
            exit()
        le=int(le)
        if not (x+dx[d],y+dy[d]) in seen:
            if le:
                print("F")
                solve(x+dx[d],y+dy[d],d)
                input()
                print("B")
        print("L")
        d+=1
        d%=4

solve(0,0,0)






####
#...
#v##
#..#
####
0