Rock Paper Scissors
题号:NC220127
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 512 M,其他语言1024 M
64bit IO Format: %lld

题目描述


输入描述:

输出描述:

Your program is to write to standard output. The first line should contain an integer indicating the maximum number of wining matches
 The following shows sample input and output for four test cases. 
示例1

输入

复制
12 4
RSPPSSSRRPPR 
RRRR

输出

复制
3
示例2

输入

复制
12 3  
RRRRRRRRRRRR
SSS

输出

复制
0
示例3

输入

复制
12 4  
PPPRRRRRRRRR
RSSS

输出

复制
2
示例4

输入

复制
12 4  
RRRRRRRRRSSS
RRRS

输出

复制
3