시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 1024 MB45333073.171%

문제

Petter is taking the local train in a new city for the first time. He is well prepared and have memorized the names of all the stops. However, some of the pixels on the monitor that displays the upcoming stop are broken. Can you help him decide what the next stop is?

입력

The first line of input consists of three integers $1 \leq h \leq 100$, $1 \leq w \leq 100$ and $1 \leq n \leq 100$, the height and width of the screen in pixels and the number of train stops, respectively. Then there are $h \cdot n$ lines, where line $i\cdot h$ to $i\cdot h + h - 1$ shows how train stop $i$ is rendered on a fully functioning screen (for stops $i \in \{0, 1, 2, \ldots, n-1\}$). The input ends with $h$ more lines that shows the current screen. Pixels on the screen that are turned on are denoted by x and pixels that are turned off are denoted by a period (.). If a screen is broken, it means that one or more of the pixels are always off.

출력

Output yes if you can tell him what the next stop is, and no otherwise.

예제 입력 1

3 9 2
x.x.x.xxx
xxx.x..x.
x.x.x..x.
xx..x.xxx
x.x.x..x.
xx..x..x.
....x....
.x..x....
....x....

예제 출력 1

yes

예제 입력 2

1 4 2
x.xx
xx.x
x..x

예제 출력 2

no

출처

Contest > Bergen Open > Bergen Open 2021 G번

  • 문제를 만든 사람: Petter Daae