QOJ.ac

QOJ

Time Limit: 1 s Memory Limit: 1024 MB Total points: 100

#3762. 2020 vs 2018

الإحصائيات

题外话:你还记得 2018 年让你输出 2018 字符画的湖南省赛吗?

Bobo 有一副 $n$ 行 $m$ 列,只包含 .o 两种字符的字符画。其中 . 是背景,o 画出了 2018 或者 2020。请识别给出的字符画是 2018 还是 2020 的。

Input

输入文件包含多组数据,请处理到文件结束。

每组数据的第一行包含两个整数 $n$ 和 $m$,接下来的 $n$ 行每行包含 $m$ 个字符表示字符画。

  • $1 \leq n, m \leq 50$
  • 数据组数不超过 $100$.
  • 字符画
    • 只包含 .o 两种字符;
    • 只会是 2018 或者 2020 的字符画;
    • 不同数字的字符 o 不会(在 $8$ 个方向上)相邻;
    • 笔画都是水平或者竖直的,但是大小和位置都可能任意出现。

Output

对于每组数据,如果给出的字符画是 2020,输出 2020,否则输出 2018.

样例输入

6 14
..............
.oo.ooo.oo.ooo
..o.o.o..o.o.o
.oo.o.o.oo.o.o
.o..o.o.o..o.o
.oo.ooo.oo.ooo
6 14
....ooo....ooo
.oo.o.o..o.o.o
..o.o.o..o.ooo
.oo.o.o..o.o.o
.o..ooo..o.o.o
.oo......o.ooo
11 12
ooo...ooo...
o.o.....o...
ooo...ooo...
......o.....
ooooo.o.ooo.
o...o.o...o.
o...o.ooo.o.
o...o.....o.
o...o...ooo.
o...o...o...
ooooo...ooo.

样例输出

2020
2018
2020
About Issues

We understand that our problem archive is not perfect. If you find any issues with the problem, including the statement, scoring configuration, time/memory limits, test cases, etc.

You may use this form to submit an issue regarding the problem. A problem moderator will review your issue and proceed it properly.

STOP! Before you submit an issue, please READ the following guidelines:

  1. This is not a place to publish a discussion, editorial, or requests to debug your code. Your issue will only be visible by you and problem moderators. Other users will not be able to view or reply your issues.
  2. Do not submit duplicated issues. If you have already submitted one, please wait for an moderator to review it. Submitting multiple issues will not speed up the review process and might cause your account to be banned.
  3. Issues must be filed in English or Chinese only.
  4. Be sure your issue is related to this problem. If you need to submit an issue regarding another problem, contest, category, etc., you should submit it to the corresponding page.

Active Issues 0

No issues in this category.

Closed/Resolved Issues 0

No issues in this category.