結果
| 問題 | 
                            No.331 CodeRunnerでやれ
                             | 
                    
| コンテスト | |
| ユーザー | 
                             vwxyz
                         | 
                    
| 提出日時 | 2023-12-26 06:20:43 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                TLE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 998 bytes | 
| コンパイル時間 | 522 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 111,636 KB | 
| 平均クエリ数 | 2.47 | 
| 最終ジャッジ日時 | 2024-09-27 14:59:17 | 
| 合計ジャッジ時間 | 9,520 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 2 TLE * 1 -- * 13 | 
ソースコード
import sys
sys.setrecursionlimit(10**7)
N=int(input())
seen=set()
def solve(x,y):
    le=input()
    if le=="Merry Christmas!":
        exit()
    le=int(le)
    if not (x+1,y) in seen:
        if le:
            print("F")
            solve(x+1,y)
            input()
            print("B")
    print("L")
    le=input()
    if le=="Merry Christmas!":
        exit()
    le=int(le)
    if not (x,y+1) in seen:
        if le:
            print("F")
            solve(x,y+1)
            input()
            print("B")
    print("L")
    le=input()
    if le=="Merry Christmas!":
        exit()
    le=int(le)
    if not (x-1,y) in seen:
        if le:
            print("F")
            solve(x-1,y)
            input()
            print("B")
    
    print("L")
    le=input()
    if le=="Merry Christmas!":
        exit()
    le=int(le)
    if not (x,y-1) in seen:
        if le:
            print("F")
            solve(x,y-1)
            input()
            print("B")
print("F")
solve(0,0)
            
            
            
        
            
vwxyz