QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#394448#7751. Palindrome PathcarrotqqWA 1ms3896kbC++141.8kb2024-04-20 14:51:172024-04-20 14:51:18

详细

Test #1:

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

input:

2 2
11
11
1 1 2 2

output:

RDRLRDURLRDDRLRUDRLRDR

result:

ok Valid Solution (Length = 22).

Test #2:

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

input:

2 2
10
01
1 1 2 2

output:

-1

result:

ok No Solution.

Test #3:

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

input:

1 1
1
1 1 1 1

output:



result:

ok Valid Solution (Length = 0).

Test #4:

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

input:

5 4
1111
1111
1111
1111
1111
4 2 4 2

output:

LLRRLLRRRUDDRLRLLRLLDUDDUULRLLRRLLRRRDDDUUURLRLLRLLDDDUUUULRLLRRLLRRRRLRLLRLLUDLRLLRRLLRRRUDDRLRLLRLLUDDUDDLRLLRRLLRRRDURLRLLLLRLRUDRRRLLRRLLRLDDUDDULLRLLRLRDDURRRLLRRLLRLDULLRLLRLRRRRLLRRLLRLUUUUDDDLLRLLRLRUUUDDDRRRLLRRLLRLUUDDUDLLRLLRLRDDURRRLLRRLL

result:

ok Valid Solution (Length = 250).

Test #5:

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

input:

5 5
11111
10101
11111
10101
11111
1 4 5 5

output:

RDDDDRLRRLLRRRLLLRRRRLLLLDUDDUURRRRRLLDDDUUDDDUUUDDDDUUUURRRLLLRRRRLLLLDDDDDUUUURRDDRRRLLLRRRRLLLLDDRRRRDUDDUUDDDUUUDDDDUUUURLRDDDDDDDDRLRUUUUDDDDUUUDDDUUDDUDRRRRDDLLLLRRRRLLLRRRDDRRUUUUDDDDDLLLLRRRRLLLRRRUUUUDDDDUUUDDDUUDDDLLRRRRRUUDDUDLLLLRRRRLLLRRRLLRRLRDDDDR

result:

ok Valid Solution (Length = 262).

Test #6:

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

input:

5 3
111
100
111
001
111
4 3 3 2

output:

DRLRLLLRLRRUURLRLLUULRLRRRLRLLDDLRLRRDDRLRLLLRLRRUURLLRUURRLRLLLRLRDDRRLRLDDLLRLRRRLRLUULLRLRUURRLRLLLRLRD

result:

ok Valid Solution (Length = 106).

Test #7:

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

input:

5 4
1001
1101
1111
0011
0010
2 2 1 1

output:

UDRRUUDDDLUUDDURUUUUDUUDDLLLUUUDUUDDRUUDRRUUDDDLUUDDURUUUUDUUDDLLLUUUULLLDDUUDUUUURUDDUULDDDUURRDUURDDUUDUUULLLDDUUDUUUURUDDUULDDDUURRDU

result:

ok Valid Solution (Length = 136).

Test #8:

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

input:

5 3
101
111
100
111
100
4 1 2 2

output:

LRLRRRLRLLDUUULRLRRUDRLRLLUDDDLRLRRRLRLLDUUULRRLUUUDLLRLRRRLRLDDDULLRLRDURRLRLUUUDLLRLRRRLRL

result:

ok Valid Solution (Length = 92).

Test #9:

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

input:

5 5
01110
10110
11110
11011
11100
2 4 5 1

output:

DDLRLDULLDDLLRRLLDUDDUUDDDUUUDDDLRDUDDUULLRRDUDDUULLRRLLLRDDLLRRRDDUUDDLRLDULLDDLLRRLLLLRRLLDDLLUDLRLDDUUDDRRRLLDDRLLLRRLLUUDDUDRRLLUUDDUDRLDDDUUUDDDUUDDUDLLRRLLDDLLUDLRLDD

result:

ok Valid Solution (Length = 172).

Test #10:

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

input:

5 3
011
111
110
111
011
3 1 2 1

output:

LRUUDDDLLRRUDLLRULLLRUULLRRULLRUDLLLRUUDDLLRUUDDDLLRRUDLLRULLLRUULLRRULLRUDLLLLDURLLURRLLUURLLLURLLDURRLLDDDUURLLDDUURLLLDURLLURRLLUURLLLURLLDURRLLDDDUURL

result:

ok Valid Solution (Length = 154).

Test #11:

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

input:

4 5
11111
11111
11111
11111
3 2 1 3

output:

LLRRLLRRRLLRRRUUUDDDRLRRLLRRLLLRRLLLUULRLLRRLLRRRLLRRRURLRRLLRRLLLRRLLLLRLLRRLLRRRLLRRRUDRLRRLLRRLLLRRLLLUUDDUUUDDDLRLLRRLLRRRLLRRRURLRRLLRRLLLLLRRLLRRRLLRRRUUUDDDRLRRLLRRLLLRRLLLUULRLLRRLLRRRLLRRRURLRRLLLLRRLRURRRLLRRRLLRRLLRLUULLLRRLLLRRLLRRLRDDDUUURRRLLRRRLLRRLLLLLRRLLRRLRURRRLLRRRLLRRLLRLDDDUUUD...

result:

ok Valid Solution (Length = 408).

Test #12:

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

input:

5 5
11111
10101
11111
10101
11111
2 5 1 1

output:

UUDDUUUDDDUUUUDDDDLLLLUULRLLRRLLLRRRLUUUDDDUUULLLRRRLLLLRRRRLLLLUDULRLLRRUDUUDDLLUUUDDDUUUUDDDDLRLLRRLLLRRRLLLLRRRRUUUUUDDUUUDDDUUUUDDDDLLLLUULRLLRRLLLRRRLUUUDDDUUULLLRRRLLLLRRRRLLLLLLLLRRRRLLLLRRRLLLUUUDDDUUULRRRLLLRRLLRLUULLLLDDDDUUUUDDDUUUDDUUUUURRRRLLLLRRRLLLRRLLRLDDDDUUUUDDDUUULLDDUUDURRLLRLUDU...

result:

ok Valid Solution (Length = 364).

Test #13:

score: 0
Accepted
time: 1ms
memory: 3780kb

input:

4 5
11111
10000
11111
00001
1 3 4 5

output:

RRLLLLDDRRRRDDULLLLDUDUURRRRLLLLDDRRRRDDRRRRDDLLLLRRRRUUDUDLLLLUDDRRRRDDLLLLRR

result:

ok Valid Solution (Length = 78).

Test #14:

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

input:

3 5
10100
00010
00111
1 3 1 1

output:

-1

result:

ok No Solution.

Test #15:

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

input:

4 5
10001
11111
11100
11111
4 5 3 1

output:

LLLLDULRLLRRDDUULLRRRLLRRRDUUDLLLLDDUUUUDLRLLRRUDLLUDDLRLLRRLLRRRLLRRRLLLLDUUDLLLLRRRLLRRRLLRRLLRLDDULLDURRLLRLDUUUUDDLLLLDUUDRRRLLRRRLLUUDDRRLLRLUDLLLL

result:

ok Valid Solution (Length = 152).

Test #16:

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

input:

3 5
11111
10100
11111
1 2 3 5

output:

RRRRLRRLLDDRRRLRRLLRRRLLLRRRRLLLLUUDDRRUURRRLLLRRRRLRRLLDDRRRRDDLLRRLRRRRLLLRRRUURRDDUULLLLRRRRLLLRRRLLRRLRRRDDLLRRLRRRR

result:

ok Valid Solution (Length = 120).

Test #17:

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

input:

4 5
01110
10101
11011
10111
1 3 2 3

output:

-1

result:

ok No Solution.

Test #18:

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

input:

5 5
11111
11111
11111
11111
11111
1 3 5 2

output:

LLLRRRLLLRRRRDDDDRLRLLRLLRLLDULRLLRRLLLRRRDDUURLLRLLRLLDDDUUULRLLRRLLLRRRRLLRLLDDDDUUUURLLLRDRLLDLRLLRRLLLRRRDRLLRLLRLLDLRLLRRLLLRRRLLLRRRRDUDDUUDDDUUUDDDDUUUURLRLLLLLRRRLLLRRRRDDDDRLRLLRLLLLRLLRLRDDDDRRRRLLLRRRLLLLLRLRUUUUDDDDUUUDDDUUDDUDRRRRLLLRRRLLLRRLLRLDLLRLLRLLRDRRRLLLRRLLRLDLLRDRLLLRUUUUDDDDL...

result:

ok Valid Solution (Length = 378).

Test #19:

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

input:

5 5
11111
10101
11111
10101
11111
5 1 2 3

output:

RRRRDUDUULLUUUDDDDUULLUUUDDDDUUDUUDUURRRRUDDUULLUDDUULLUDUUDDRRRRUUUDDDUUUDDDDLLLLRRRRDUDUULLUUUDDDDUULLUUUDDDDUUDUUDUURRRRUDDUULLUDDULLUUDDURRRRUUDUUDUUDDDDUUULLUUDDDDUUULLUUDUDRRRRLLLLDDDDUUUDDDUUURRRRDDUUDULLUUDDULLUUDDURRRRUUDUUDUUDDDDUUULLUUDDDDUUULLUUDUDRRRR

result:

ok Valid Solution (Length = 264).

Test #20:

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

input:

5 5
11111
10000
11111
00001
11111
4 5 5 3

output:

DRLRRLLRRLLLRRLLLLRLLRRLLRRRLLRRRUURLRRLLRRLLLRRLLLUULRLLRRLLRRRLLRRRRLRRLLRRLLLRRLLLDDLRLLRRLLRRRLLRRRDDRLRRLLLLRRLRDDRRRLLRRRLLRRLLRLDDLLLRRLLLRRLLRRLRRRRLLRRRLLRRLLRLUULLLRRLLLRRLLRRLRUURRRLLRRRLLRRLLRLLLLRRLLLRRLLRRLRD

result:

ok Valid Solution (Length = 222).

Test #21:

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

input:

5 5
01010
10101
10101
11001
10011
4 1 5 4

output:

-1

result:

ok No Solution.

Test #22:

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

input:

5 5
10101
11111
10101
11111
11111
3 1 2 4

output:

DLRLRRLRRLRRDRLRRLLRRRLLLRRRLLLLLRLRRLRRLRRUUURLRRLLDURRRLLLRRRLLLLUDLRLRRUDLRRLRRUDDDRLRRLLRRRLLLRRRLLLLUDLRLRRLRRLRRDRLRRLLRRRLLLRRRLLLLLRLRRLRRLRRUUURLLRUUURRLRRLRRLRLLLLLRRRLLLRRRLLRRLRDRRLRRLRRLRLDULLLLRRRLLLRRRLLRRLRDDDURRLRRLDURRLRLDULLLLRRRLLLRRRUDLLRRLRUUURRLRRLRRLRLLLLLRRRLLLRRRLLRRLRDRRLR...

result:

ok Valid Solution (Length = 308).

Test #23:

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

input:

5 5
00001
11111
01110
01111
01111
1 5 5 2

output:

DLDDLLLRRRDLLLDULRDDUULDDDUUULLRRLLLRDLRDLDLRLLRRLLLRRRDULDDUUDDDUUULLLRRRRDUDLDDLLLRRRDLLLLLLDRRRLLLDDLDUDRRRRLLLUUUDDDUUDDLUDRRRLLLRRLLRLDLDRLDRLLLRRLLUUUDDDLUUDDRLUDLLLDRRRLLLDDLD

result:

ok Valid Solution (Length = 182).

Test #24:

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

input:

5 5
01011
10111
11011
10101
01110
4 1 2 3

output:

-1

result:

ok No Solution.

Test #25:

score: -100
Wrong Answer
time: 1ms
memory: 3884kb

input:

10 8
11111111
11111111
11111111
11111111
11111111
11111111
11111111
11111111
11111111
11111111
7 7 3 6

output:

LLRRRUUUUUUUDDDDDDDUUUUUUUDDDDDDDDUUUUUUUDDDDDDDDRLRRLLRRRLLLRRRRLLLLRRRRRLLLLLRRRRRLLLLLLRRRRRLLLLLLDULRLLRRLLRRRLLRRRLLRRRLLRRRDDUURRLLRRRLLLRRRRLLLLRRRRRLLLLLRRRRRLLLLLLRRRRRLLLLLLDDUUULRLLRRLLRRRLLRRRLLRRRDDUUULLRRRLLRRRDDUUURLRRLLRRRLLLUUUUUDDDDDRRRRLLLLRRRRRLLLLLRRRRRLLLLLLRRRRRLLLLLLDDUUULRLL...

result:

wrong answer Solution Not Palindrome