Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#2184 | #1005. 兜圈子 | Wrong Answer | 0 | 468 ms | 2896 K | Python 3 / 760 B | Derek | 2023-11-17 0:18:34 |
def find_final_position(grid):
rows, cols = len(grid), len(grid[0])
x, y = 0, 0 # Starting position
visited = set()
while True:
if (x, y) in visited: # Check for infinite loop
return -1
visited.add((x, y))
direction = grid[x][y]
if direction == 'U':
if x == 0:
break
x -= 1
elif direction == 'D':
if x == rows - 1:
break
x += 1
elif direction == 'L':
if y == 0:
break
y -= 1
elif direction == 'R':
if y == cols - 1:
break
y += 1
return x + 1, y + 1 # Adjusting to 1-indexed grid
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
9 44
RRDDDDRRRDDDRRRRRRDDDRDDDDRDDRDDDDDDRRDRRRRR
RRRDLRDRDLLLLRDRRLLLDDRDLLLRDDDLLLDRRLLLLLDD
DRDLR
<310 bytes omitted>
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
500 500
RRUURUUURDRURLLLUDDRLRUUUURRRLRUUULRLURDUDUURDRRUDDRDLLLRRLLLLULRUULRRLDDRURDLULDUDDLRRRLUDR
<250408 bytes omitted>
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
500 500
DDDUUULULDUUUUDRULURDLLULUURDLRUULDLUDRLLDDDULUURDLLDLDDRDULUUURULDRDUDUDDRDLLLLRDDUULLRLUUD
<250408 bytes omitted>
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
500 500
LULRRLLRDDULRUULRDULRUDUDLDDULRUDLLRRDULDRLDUDLDRULUUDUURLLLDRRLLDUUULUURRLRLLLDDRLDLDDRUDRD
<250408 bytes omitted>
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
500 500
RRRDLURDUUDLRRRUURUDLUDRURURUURUDDRUDDDDURUDURULDLRRRLDRDDRDDULURDDDLRDURUDDRLUUDRLUDLLDURRL
<250408 bytes omitted>
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
500 500
RRRRRDDLDLDLRRRRDLRLLLLLRUUURRUDRURDULLDLUUDLULLDLURUDDLRLRRLLRLRUUURLURDURULLRRRDULRDLDDLUU
<250408 bytes omitted>
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
500 500
DRDULLRDDURDLLLUDULRLLRRDLDUDDUULDDURUDDURDDRLRDRDRRLURDRUDLRULDRDRDURUUUDDRDDRLRDRLRUURRRUL
<250408 bytes omitted>
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
500 500
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
<250408 bytes omitted>
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
500 500
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
<250408 bytes omitted>
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
500 500
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
<250408 bytes omitted>
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
500 500
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
<250408 bytes omitted>
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0