結果
問題 |
No.331 CodeRunnerでやれ
|
ユーザー |
![]() |
提出日時 | 2023-12-22 10:55:52 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 976 bytes |
コンパイル時間 | 404 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 252,092 KB |
平均クエリ数 | 2.47 |
最終ジャッジ日時 | 2024-09-27 11:22:22 |
合計ジャッジ時間 | 8,203 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 2 TLE * 1 -- * 13 |
ソースコード
import sys sys.setrecursionlimit(10**7) 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=input() if le=="Merry Christmas!": exit() le=int(le) if le and not (x+1,y) in seen: print("F") solve(x+1,y) B() print("L") le=input() if le=="Merry Christmas!": exit() le=int(le) if le and not (x,y+1) in seen: print("F") solve(x,y+1) B() print("L") le=input() if le=="Merry Christmas!": exit() le=int(le) if le and not (x-1,y) in seen: print("F") solve(x-1,y) B() print("L") le=input() if le=="Merry Christmas!": exit() le=int(le) if le and not (x,y-1) in seen: print("F") solve(x,y-1) B() print("F") solve(0,0)