#P3654. First Step (ファーストステップ)
First Step (ファーストステップ)
Description
However... this basketball court seems like it hasn’t been used for a long time.
It’s piled high with all kinds of school odds and ends.
How can the members of Aqours line up inside?
Our basketball court at Uranohoshi Girls’ High School is an -by- grid. It is filled with various school items (denoted by #), and it looks like there isn’t much open space (denoted by .).
We now have members in Aqours. To sing and dance, we need to form a straight line of size , standing one after another on empty cells in the court (either horizontally or vertically).
We want to know how many possible ways there are to stand.
As a true fan of Aqours, can you help us count?
Input Format
The first line contains three integers , , and .
The following lines each contain characters, representing the basketball court of Uranohoshi Girls’ High School.
Output Format
Output the total number of possible placements.
5 5 2
.###.
##.#.
..#..
#..#.
#.###
8
Hint
| Notes | ||||
|---|---|---|---|---|
| None | ||||
| No obstacles | ||||
| None | ||||
For all testdata, , .
Easter egg: In episode 3 of LoveLive! Sunshine!! season 1, when Chika Takami, the leader of Aqours, sings “If you really love it, it will be all right!” up to just before the chorus, the school loses power due to a lightning strike.
Translated by ChatGPT 5
京公网安备 11011102002149号