QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#394408#7751. Palindrome Pathy0y68WA 0ms4068kbC++145.1kb2024-04-20 14:25:272024-04-20 14:25:28

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3844kb

input:

2 2
11
11
1 1 2 2

output:

RDDURLDDURDDRUDDLRUDDR

result:

ok Valid Solution (Length = 22).

Test #2:

score: 0
Accepted
time: 0ms
memory: 4068kb

input:

2 2
10
01
1 1 2 2

output:

-1

result:

ok No Solution.

Test #3:

score: 0
Accepted
time: 0ms
memory: 3836kb

input:

1 1
1
1 1 1 1

output:


result:

ok Valid Solution (Length = 0).

Test #4:

score: 0
Accepted
time: 0ms
memory: 3740kb

input:

5 4
1111
1111
1111
1111
1111
4 2 4 2

output:

LLRRLLRRRUDDDUDDUUDDDUUUDDDUUUUUDUDDUDDRLUDDDUDDUUDDDUUUDDDUUUUUDUDDUDDRLLRLLUDDDUDDUUDDDUUUDDDUUUUUDUDDUDDLRUDDDUDDUUDDDUUUDDDUUUUUDUDDUDDDDUDDUDUUUUUDDDUUUDDDUUDDUDDDURLDDUDDUDUUUUUDDDUUUDDDUUDDUDDDULLRLLRDDUDDUDUUUUUDDDUUUDDDUUDDUDDDULRDDUDDUDUUUUUDDDUUUDDDUUDDUDDDURRRLLRRLL

result:

ok Valid Solution (Length = 278).

Test #5:

score: 0
Accepted
time: 0ms
memory: 4032kb

input:

5 5
11111
10101
11111
10101
11111
1 4 5 5

output:

RDDRLRDDRLRDUDDUUDDDUUUDDDDUUUURLRRLLRRRLLLRRRRLLLLDDDDDUDDUUDDDUUUDDDDUUUURRDDRRRLLLRDDRRRLLLRDUDDUUDDDUUUDDDDUUUURRDDRLRRLLRRRLLLRRRRLLLLDDRRRRRRRRDDLLLLRRRRLLLRRRLLRRLRDDRRUUUUDDDDUUUDDDUUDDUDRLLLRRRDDRLLLRRRDDRRUUUUDDDDUUUDDDUUDDUDDDDDLLLLRRRRLLLRRRLLRRLRUUUUDDDDUUUDDDUUDDUDRLRDDRLRDDR

result:

ok Valid Solution (Length = 290).

Test #6:

score: 0
Accepted
time: 0ms
memory: 3792kb

input:

5 3
111
100
111
001
111
4 3 3 2

output:

DRLRLLLRLRRUURLRLLUULRLRRRLRLLDDLRLRRDURLLRUDRRLRLDDLLRLRRRLRLUULLRLRUURRLRLLLRLRD

result:

ok Valid Solution (Length = 82).

Test #7:

score: 0
Accepted
time: 0ms
memory: 3828kb

input:

5 4
1001
1101
1111
0011
0010
2 2 1 1

output:

LUUDDUUUDRUDRRUUDDDUUUUDUUDDLUDUUDDUULULUULULUUDDUUDULDDUUDUUUUDDDUURRDURDUUUDDUUL

result:

ok Valid Solution (Length = 82).

Test #8:

score: 0
Accepted
time: 0ms
memory: 4064kb

input:

5 3
101
111
100
111
100
4 1 2 2

output:

LRLRRRLRLLDUUULRLRRUDRLRLLUDDDUULRRLUUDDDULLRLRDURRLRLUUUDLLRLRRRLRL

result:

ok Valid Solution (Length = 68).

Test #9:

score: 0
Accepted
time: 0ms
memory: 3724kb

input:

5 5
01110
10110
11110
11011
11100
2 4 5 1

output:

LDLLDDDUDDUUDDDUUUDLRDDLLRRLDUDDUULLRRDUDDUULLRDLRDDLRLDUDDUUDDDUUUDLDLLDLRDLLDRLDLLDLDUUUDDDUUDDUDLRLDDRLDRLLUUDDUDRRLLUUDDUDLRRLLDDRLDUUUDDDUUDDUDDDLLDL

result:

ok Valid Solution (Length = 154).

Test #10:

score: 0
Accepted
time: 0ms
memory: 3844kb

input:

5 3
011
111
110
111
011
3 1 2 1

output:

LRUUDDDLLRRUDULUUDDDUUULLRRUUDLUUDUUDDLUUDDUUUDLRULLURLDUUUDDUULDDUUDUULDUURRLLUUUDDDUULUDURRLLDDDUURL

result:

ok Valid Solution (Length = 102).

Test #11:

score: 0
Accepted
time: 0ms
memory: 3748kb

input:

4 5
11111
11111
11111
11111
3 2 1 3

output:

LLRRLLRRRLLRRRUUUDDDUUUUDUUDDRLUUUDDDUUUUDUUDDRRLLUUUDDDUUUUDUUDDRRLLLRRLLLUUUDDDUUUUDUUDDLRUUUDDDUUUUDUUDDLLRRLLRRRLLRRRUUUDDDRLRRLLRRLLLRRLLLUULRLLRRLLRRRLLRRRURLRRLLLLRRLRURRRLLRRRLLRRLLRLUULLLRRLLLRRLLRRLRDDDUUURRRLLRRRLLRRLLDDUUDUUUUDDDUUURLDDUUDUUUUDDDUUULLLRRLLLRRDDUUDUUUUDDDUUULLRRDDUUDUUUUD...

result:

ok Valid Solution (Length = 336).

Test #12:

score: 0
Accepted
time: 0ms
memory: 3772kb

input:

5 5
11111
10101
11111
10101
11111
2 5 1 1

output:

UUDDLLLLUUUDDDUUUUDDDDUUUUUDDLRLLRRUUUDDDUUUUDDDDLLLRRUUUUUDDLLLRRRLLLLRRRRUUUDDDUUUUDDDDLLLLLRRRRUUUULLLLLRLLRRLLLRRRLLLLRRRRUDUUDDLLLLUUUULLLLDDUUDURRRRLLLLRRRLLLRRLLRLLLLLUUUURRRRLLLLLDDDDUUUUDDDUUURRRRLLLLRRRLLLDDUUUUURRLLLDDDDUUUUDDDUUURRLLRLDDUUUUUDDDDUUUUDDDUUULLLLDDUU

result:

ok Valid Solution (Length = 276).

Test #13:

score: 0
Accepted
time: 0ms
memory: 3836kb

input:

4 5
11111
10000
11111
00001
1 3 4 5

output:

RRLLLLDDRRRRDDULLLLDUDUURRLLDDRRRRDDRRRRDDLLRRUUDUDLLLLUDDRRRRDDLLLLRR

result:

ok Valid Solution (Length = 70).

Test #14:

score: 0
Accepted
time: 0ms
memory: 3712kb

input:

3 5
10100
00010
00111
1 3 1 1

output:

-1

result:

ok No Solution.

Test #15:

score: 0
Accepted
time: 0ms
memory: 3840kb

input:

4 5
10001
11111
11100
11111
4 5 3 1

output:

LLLLDUDDUUDDUUUUDUDDUDDLRDUDDUUUDUDDLLRRDUDDUULLRRRLLRRRDUUDLLUDUDDLLRRRLLRRRLLLLDUUDLLLLRRRLLRRRLLDDUDULLDUUDRRRLLRRRLLUUDDUDRRLLDDUDUUUDDUDRLDDUDDUDUUUUDDUUDDUDLLLL

result:

ok Valid Solution (Length = 166).

Test #16:

score: 0
Accepted
time: 0ms
memory: 3740kb

input:

3 5
11111
10100
11111
1 2 3 5

output:

RRRRLRRLLDDRRRLRRLLRRRLLLRUURRRLLLRRRRLLLLDDUURRDDRRRRDDRRUUDDLLLLRRRRLLLRRRUURLLLRRRLLRRLRRRDDLLRRLRRRR

result:

ok Valid Solution (Length = 104).

Test #17:

score: -100
Wrong Answer
time: 0ms
memory: 3840kb

input:

4 5
01110
10101
11011
10111
1 3 2 3

output:

RLLRDDUDDUDDRLLR

result:

wrong answer (2,1) Not Visited