题目描述
> "Cytus II" is a music rhythm game created by Rayark. Based on the instinctively simple gameplay of its predecessor "Cytus", this sequel added more types of notes to enhance the gameplay.
<div style="text-align: center">
<img src="/userfiles/images/2d87007f-cdcd-414a-947b-4abbd996fde6.gif"/>
<p><small><em>A demo GIF of "Cytus II".</em></small></p>
</div>
<small style='color: #666'>*In order to simplify the topic, we assume that there is only **click notes** (用于点击的音符) in the **chart** (谱面), and there is no case of overlap. We do not consider the remaining types such as slide, long click, hold and others in this problem.*</small>
Each song in the game is equipped with a variety of difficulty *charts*. A *chart* contains multiple pages, and each page in the *chart* consists of a grid map with a size of $8\times 10$. Each *note* is strictly in a grid, and the same grid contains only one *note* at most.
The *scanning line* moves from bottom to top in the odd pages, and moves from top to bottom in the even pages. Since the *scanning line* is always horizontal, the *note's* appearance of the same horizontal lines in the same page is the same time.
Now, it is known that a *chart* consists of $N$ pages, and you need to output **the number of *notes* on the scanning line** in **each unit time**.
<p style='text-align: center; color: #fff0f0'>It's an easy problem, right? Solve it now!</p>
输入格式
The first line contains only a single integer $N$ --- the count of pages.
Next, input $N$ pages in order, and each page consists of a $10\times 12$ character (including frame) grid map. Among them, in the $8\times 10$ grid in the middle, the character `o` represents *note*.
- $1\le N\le 1000$
输出格式
Output $N$ lines, each line containing $8$ integers, the $j$-th integer in the $i$-th line represents the number of notes on the *scanning line* in the ($8(i-1)+j$)-th unit time.
样例输入 #1
2 +----------+ |o | |o o | |o oo | |o ooo | | oo ooo | | oo oo | | oo o | | o o | +----------+ +----------+ |o | |o o | |o oo | |o ooo | | oo ooo | | oo oo | | oo o | | o o | +----------+
样例输出 #1
2 3 4 5 4 3 2 1 1 2 3 4 5 4 3 2
提示
*Feeling tired? Or bored? Come and play the game!*
<p id='src-prob-3872-game-score-p'>
Score: <span id='src-prob-3872-game-score' style='text-weight: bold; font-size: 120%'>0</span>
</p>
<p>
<button type='button' class='btn btn-outline-success' id='src-prob-3872-game-btn'>Start Game</button>
</p>
<table class='border-0' id='src-prob-3872-game-table'>
<tbody>
<tr>
<td><div id="src-prob-3872-game-1-1" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-1-2" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-1-3" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-1-4" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-1-5" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-1-6" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-1-7" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-1-8" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
</tr>
<tr>
<td><div id="src-prob-3872-game-2-1" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-2-2" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-2-3" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-2-4" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-2-5" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-2-6" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-2-7" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-2-8" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
</tr>
<tr>
<td><div id="src-prob-3872-game-3-1" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-3-2" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-3-3" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-3-4" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-3-5" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-3-6" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-3-7" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-3-8" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
</tr>
<tr>
<td><div id="src-prob-3872-game-4-1" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-4-2" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-4-3" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-4-4" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-4-5" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-4-6" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-4-7" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-4-8" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
</tr>
<tr>
<td><div id="src-prob-3872-game-5-1" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-5-2" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-5-3" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-5-4" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-5-5" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-5-6" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-5-7" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-5-8" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
</tr>
<tr>
<td><div id="src-prob-3872-game-6-1" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-6-2" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-6-3" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-6-4" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-6-5" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-6-6" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-6-7" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-6-8" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
</tr>
<tr>
<td><div id="src-prob-3872-game-7-1" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-7-2" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-7-3" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-7-4" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-7-5" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-7-6" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-7-7" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-7-8" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
</tr>
<tr>
<td><div id="src-prob-3872-game-8-1" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-8-2" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-8-3" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-8-4" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-8-5" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-8-6" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-8-7" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
<td><div id="src-prob-3872-game-8-8" class="spinner-border" role="status"><span class="sr-only">...</span></div></td>
</tr>
</tbody>
</table>
<script>
var problem3872_score = 0;
var problem3872_colortext = [
"text-success",
"text-primary",
"text-secondary",
"text-danger",
"text-warning",
"text-info",
"text-light",
"text-dark"
];
$(document).ready(function(){
$("#src-prob-3872-game-score-p").hide();
$("#src-prob-3872-game-table").hide();
for(let i = 1; i <= 8; i ++)
for(let j = 1; j <= 8; j ++) {
let dom = $("#src-prob-3872-game-" + i + "-" + j);
dom.css("visibility", "hidden");
dom.parent().on("click", function() {
if(dom.css("visibility") == "visible") {
dom.css("visibility", "hidden");
$("#src-prob-3872-game-score").html(++ problem3872_score);
}
});
}
$("#src-prob-3872-game-btn").on("click", function() {
setTimeout(problem3872_gameStart, 1000);
$(this).hide();
$("#src-prob-3872-game-score-p").show();
$("#src-prob-3872-game-table").show();
});
});
function problem3872_gameStart() {
let cnt = 0;
for(let i = 1; i <= 8; i ++)
for(let j = 1; j <= 8; j ++)
if(Math.random() < 1 / 16) {
let dom = $("#src-prob-3872-game-" + i + "-" + j);
for(let k = 0; k < problem3872_colortext.length; k ++)
dom.removeClass(problem3872_colortext[k]);
dom.addClass(problem3872_colortext[Math.floor(Math.random() * problem3872_colortext.length)]);
dom.css("visibility", "visible");
let fn = function() {
if(dom.css("visibility") != "hidden")
dom.css("visibility", "hidden");
};
setTimeout(fn, 1200);
cnt ++;
}
setTimeout("problem3872_gameStart()", 1600);
}
</script>