Problem Y
Science!
Welcome, ladies and gentlemen, to Aperture Science. Astronauts, War Heroes, Olympians — you’re here because we want the best, and you are it. That said, it’s time to make some science.
Now, I want each of you to stand on one of these buttons. Well done, we’re making great progress here. Now let’s do it again. Oh, come on - don’t stand on the same button! Move, people! No, no, that button’s only for the Astronauts, you know who you are. What?! You say you can’t do everything I ask? Ok let’s start over. You there, the Programmer, figure out how many times we can do this. And make it quick, we have a lot more science to get through…
Input
There will be a single test case in the input. The first
line of this case will contain
Output
Output
Sample Input 1 | Sample Output 1 |
---|---|
3 YYY NYY YNY |
2 1 2 3 3 1 2 |
Sample Input 2 | Sample Output 2 |
---|---|
2 YN YN |
0 |