A1242 | [COCI-2011_2012-contest6]#4 PROZORI
来源COCI
时间限制1s
内存限制128MB
通过 / 提交0/0
题目描述
Now that spring is here and the sun is shining bright, people are starting to lower their blinds. Štefica is an elderly woman who likes to keep track of what other people in the neighbourhood are doing and then talk about it behind their backs. This year, she is particularly interested in who is lowering blinds in the building across the street, and how low are they lowering them.
We will represent each window with a 4 x 4 grid, with asteriskes representing lowered blinds. Štefica can see a window in one of the following 5 states:
The building across the street has N windows at each of the M floors. Given the current building state, find out how many windows are in each of the 5 states shown above.
We will represent each window with a 4 x 4 grid, with asteriskes representing lowered blinds. Štefica can see a window in one of the following 5 states:
The building across the street has N windows at each of the M floors. Given the current building state, find out how many windows are in each of the 5 states shown above.
输入格式
The first line of input contains space separated integers M and N (1 ≤ M, N ≤ 100).
The following lines describe the current building state. Each window is represented with one of the 4 x 4 grids shown above, and windows are separated using character „#‟. See the example input for clarification. Building description will have exactly 5M + 1 lines each having 5N + 1 characters.
The following lines describe the current building state. Each window is represented with one of the 4 x 4 grids shown above, and windows are separated using character „#‟. See the example input for clarification. Building description will have exactly 5M + 1 lines each having 5N + 1 characters.
输出格式
Output should contain 5 space separated integers, number of windows for each type in order shown above. Sum of these numbers is M*N.
输入输出样例
输入 #1
1 2 ########### #....#****# #....#****# #....#....# #....#....# ###########
输出 #1
1 0 1 0 0
输入 #2
2 3 ################ #****#****#****# #****#****#****# #****#....#****# #....#....#****# ################ #....#****#****# #....#****#....# #....#....#....# #....#....#....# ################
输出 #2
1 1 2 1 1
暂无题解
C++ 编辑器
输入
输出
可保存默认模板;新题优先使用已保存模板。
当前快捷键仅展示,暂不支持修改。
- 撤销
Ctrl / ⌘ + Z - 重做
Ctrl / ⌘ + Y - 查找
Ctrl / ⌘ + F - 全选
Ctrl / ⌘ + A - 复制
Ctrl / ⌘ + C - 剪切
Ctrl / ⌘ + X - 粘贴
Ctrl / ⌘ + V - 自动排版
工具栏排版按钮 - 草稿保存
编辑时自动保存到本机
历史
提交记录
状态说明时间源码
AI
作答助手
你好,我是作答助手。可以问思路、复杂度、样例含义或代码报错原因;不会直接给出完整 AC 代码。
确定要清空代码吗?
提交通过
评测结果:Accepted