编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#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
子任务 #1
Wrong Answer
得分:0
测试点 #1
Wrong Answer
得分:0
用时:36 ms
内存:2796 KiB

输入文件(00_sample_00.in

2 3
RDU
LRU

答案文件(00_sample_00.out

1 3

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #2
Wrong Answer
得分:0
用时:39 ms
内存:2836 KiB

输入文件(00_sample_01.in

2 3
RRD
ULL

答案文件(00_sample_01.out

-1

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #3
Wrong Answer
得分:0
用时:35 ms
内存:2860 KiB

输入文件(00_sample_02.in

9 44
RRDDDDRRRDDDRRRRRRDDDRDDDDRDDRDDDDDDRRDRRRRR
RRRDLRDRDLLLLRDRRLLLDDRDLLLRDDDLLLDRRLLLLLDD
DRDLR
<310 bytes omitted>

答案文件(00_sample_02.out

9 5

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #4
Wrong Answer
得分:0
用时:34 ms
内存:2860 KiB

输入文件(01_random_1_00.in

500 500
RRUURUUURDRURLLLUDDRLRUUUURRRLRUUULRLURDUDUURDRRUDDRDLLLRRLLLLULRUULRRLDDRURDLULDUDDLRRRLUDR
<250408 bytes omitted>

答案文件(01_random_1_00.out

1 3

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #5
Wrong Answer
得分:0
用时:33 ms
内存:2812 KiB

输入文件(01_random_1_01.in

500 500
DDDUUULULDUUUUDRULURDLLULUURDLRUULDLUDRLLDDDULUURDLLDLDDRDULUUURULDRDUDUDDRDLLLLRDDUULLRLUUD
<250408 bytes omitted>

答案文件(01_random_1_01.out

-1

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #6
Wrong Answer
得分:0
用时:34 ms
内存:2808 KiB

输入文件(01_random_1_02.in

500 500
LULRRLLRDDULRUULRDULRUDUDLDDULRUDLLRRDULDRLDUDLDRULUUDUURLLLDRRLLDUUULUURRLRLLLDDRLDLDDRUDRD
<250408 bytes omitted>

答案文件(01_random_1_02.out

1 1

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #7
Wrong Answer
得分:0
用时:28 ms
内存:2800 KiB

输入文件(02_random_2_00.in

500 500
RRRDLURDUUDLRRRUURUDLUDRURURUURUDDRUDDDDURUDURULDLRRRLDRDDRDDULURDDDLRDURUDDRLUUDRLUDLLDURRL
<250408 bytes omitted>

答案文件(02_random_2_00.out

-1

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #8
Wrong Answer
得分:0
用时:34 ms
内存:2896 KiB

输入文件(02_random_2_01.in

500 500
RRRRRDDLDLDLRRRRDLRLLLLLRUUURRUDRURDULLDLUUDLULLDLURUDDLRLRRLLRLRUUURLURDURULLRRRDULRDLDDLUU
<250408 bytes omitted>

答案文件(02_random_2_01.out

-1

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #9
Wrong Answer
得分:0
用时:34 ms
内存:2876 KiB

输入文件(02_random_2_02.in

500 500
DRDULLRDDURDLLLUDULRLLRRDLDUDDUULDDURUDDURDDRLRDRDRRLURDRUDLRULDRDRDURUUUDDRDDRLRDRLRUURRRUL
<250408 bytes omitted>

答案文件(02_random_2_02.out

-1

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #10
Wrong Answer
得分:0
用时:36 ms
内存:2884 KiB

输入文件(03_max_00.in

500 500
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
<250408 bytes omitted>

答案文件(03_max_00.out

-1

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #11
Wrong Answer
得分:0
用时:33 ms
内存:2840 KiB

输入文件(03_max_01.in

500 500
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
<250408 bytes omitted>

答案文件(03_max_01.out

341 1

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #12
Wrong Answer
得分:0
用时:30 ms
内存:2888 KiB

输入文件(03_max_02.in

500 500
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
<250408 bytes omitted>

答案文件(03_max_02.out

500 432

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #13
Wrong Answer
得分:0
用时:35 ms
内存:2780 KiB

输入文件(03_max_03.in

500 500
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
<250408 bytes omitted>

答案文件(03_max_03.out

432 500

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #14
Wrong Answer
得分:0
用时:27 ms
内存:2840 KiB

输入文件(03_max_04.in

500 500
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
<250408 bytes omitted>

答案文件(03_max_04.out

1 441

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0