結果

問題 No.331 CodeRunnerでやれ
ユーザー vwxyz
提出日時 2023-12-22 10:47:09
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 647 bytes
コンパイル時間 202 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 28,504 KB
平均クエリ数 727.82
最終ジャッジ日時 2024-09-27 11:21:44
合計ジャッジ時間 7,572 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 1
other WA * 7 RE * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
seen=set()
def F():
    input()
    print("F")
def B():
    input()
    print("B")
def L():
    input()
    print("L")
def R():
    input()
    print("R")
def solve(x,y):
    seen.add((x,y))
    le=int(input())
    print("F")
    if le and not (x+1,y) in seen:
        solve(x+1,y)
        B()
    L()
    le=int(input())
    print("F")
    if le and not (x,y+1) in seen:
        solve(x,y+1)
        B()
    le=int(input())
    print("F")
    if le and not (x-1,y) in seen:
        solve(x-1,y)
        B()
    le=int(input())
    print("F")
    if le and not (x,y-1) in seen:
        solve(x,y-1)
        B()
print("F")
solve(0,0)
0