ICPC 2023 vòng Quốc gia - G: Guarded Rook Combinations

View as PDF

Submit solution

Points: 1.40
Time limit: 1.0s
Memory limit: 512M
Input: stdin
Output: stdout

Problem source:
ICPC 2023 vòng Quốc gia
Problem type
Allowed languages
C, C++, Go, Java, Kotlin, Pascal, PyPy, Python, Rust, Scratch

In case the statement didn't load correctly, you can download the statement here: Statement

Sample Input 1

7 4 12
.......
.R...R.
.......
...R...
.......
.R...R.
.......
7 0 12
.......
.R...R.
.......
...R...
.......
.R...R.
.......
10 22 136
.RR.RR.RR.
.RRRRRRRR.
.R......R.
..RRRRRR..
..R....R..
..R....R..
.RRRRRRRR.
R........R
RRRRRRRRRR
RRRRRRRRRR
0 0 0

Sample Output 1

YES
.......
.R.R.R.
.......
.R.R.R.
.......
.R.R.R.
.......
NO
YES
.RR.RR.RR.
.RRRRRRRR.
.RRRRRRRR.
..RRRRRR..
..RRRRRR..
..RRRRRR..
.RRRRRRRR.
RRRRRRRRRR
RRRRRRRRRR
RRRRRRRRRR

Comments

Please read the guidelines before commenting.


There are no comments at the moment.