ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1508. Japanese Puzzle

WA 5...Please give some tests..Thx~
Posted by Scau_Ly 27 Aug 2014 21:16
I use Dynamic Programming..and i made several tests myself, my code could calculate the right answer = =...sorry for my poor English
Re: WA 5...Please give some tests..Thx~
Posted by Felix_Mate 11 Feb 2018 18:38
Simple tests:

1)
5 2
2 2
?????
ans:XX.XX

2)
4 2
2 2
????
ans:Impossible

3)
15 3
2 1 2
??X?.?.......X?
ans:.?X?.X.......XX

4)
15 5
2 1 2 1 2
??X?.?.X.?.?.X?
ans:Impossible

5)
5 0

XXXXX
ans:Impossible

6)
5 3
1 1 1
X.X.X
ans:X.X.X

7)
5 2
1 1
.?.?.
ans:.X.X.

8)
18 5
3 1 1 3 1
.???.X?.??..?XX?.?
ans:.XXX.X..??..?XX?.X