A. Brain's Photos

题目连接:

http://www.codeforces.com/contest/707/problem/A

Description

Small, but very brave, mouse Brain was not accepted to summer school of young villains. He was upset and decided to postpone his plans of taking over the world, but to become a photographer instead.

As you may know, the coolest photos are on the film (because you can specify the hashtag #film for such).

Brain took a lot of colourful pictures on colored and black-and-white film. Then he developed and translated it into a digital form. But now, color and black-and-white photos are in one folder, and to sort them, one needs to spend more than one hour!

As soon as Brain is a photographer not programmer now, he asks you to help him determine for a single photo whether it is colored or black-and-white.

Photo can be represented as a matrix sized n × m, and each element of the matrix stores a symbol indicating corresponding pixel color. There are only 6 colors:

'C' (cyan)

'M' (magenta)

'Y' (yellow)

'W' (white)

'G' (grey)

'B' (black)

The photo is considered black-and-white if it has only white, black and grey pixels in it. If there are any of cyan, magenta or yellow pixels in the photo then it is considered colored.

Input

The first line of the input contains two integers n and m (1 ≤ n, m ≤ 100) — the number of photo pixel matrix rows and columns respectively.

Then n lines describing matrix rows follow. Each of them contains m space-separated characters describing colors of pixels in a row. Each character in the line is one of the 'C', 'M', 'Y', 'W', 'G' or 'B'.

Output

Print the "#Black&White" (without quotes), if the photo is black-and-white and "#Color" (without quotes), if it is colored, in the only line.

Sample Input

2 2

C M

Y Y

Sample Output

Color

Hint

题意

给你张照片,告诉你这张照片用了哪些颜色,问你这个照片是彩色照片,还是黑白照片

题解:

水题嘛,if判断一下就好了

代码

#include<bits/stdc++.h>
using namespace std; int n,m;
string s;
int main()
{
int flag = 0;
scanf("%d%d",&n,&m);
for(int i=0;i<n;i++)
for(int j=0;j<m;j++)
{
cin>>s;
if(s=="C"||s=="M"||s=="Y")
flag=1;
}
if(flag)printf("#Color\n");
else printf("#Black&White\n");
}

Codeforces Round #368 (Div. 2) A. Brain's Photos 水题的更多相关文章

  1. Codeforces Round #368 (Div. 2) A. Brain's Photos (水题)

    Brain's Photos 题目链接: http://codeforces.com/contest/707/problem/A Description Small, but very brave, ...

  2. Codeforces Round #297 (Div. 2)A. Vitaliy and Pie 水题

    Codeforces Round #297 (Div. 2)A. Vitaliy and Pie Time Limit: 2 Sec  Memory Limit: 256 MBSubmit: xxx  ...

  3. Codeforces Round #290 (Div. 2) A. Fox And Snake 水题

    A. Fox And Snake 题目连接: http://codeforces.com/contest/510/problem/A Description Fox Ciel starts to le ...

  4. Codeforces Round #322 (Div. 2) A. Vasya the Hipster 水题

    A. Vasya the Hipster Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/581/p ...

  5. Codeforces Round #373 (Div. 2) B. Anatoly and Cockroaches 水题

    B. Anatoly and Cockroaches 题目连接: http://codeforces.com/contest/719/problem/B Description Anatoly liv ...

  6. Codeforces Round #359 (Div. 2) A. Free Ice Cream 水题

    A. Free Ice Cream 题目连接: http://www.codeforces.com/contest/686/problem/A Description After their adve ...

  7. Codeforces Round #355 (Div. 2) A. Vanya and Fence 水题

    A. Vanya and Fence 题目连接: http://www.codeforces.com/contest/677/problem/A Description Vanya and his f ...

  8. Codeforces Round #384 (Div. 2) A. Vladik and flights 水题

    A. Vladik and flights 题目链接 http://codeforces.com/contest/743/problem/A 题面 Vladik is a competitive pr ...

  9. Codeforces Round #379 (Div. 2) D. Anton and Chess 水题

    D. Anton and Chess 题目连接: http://codeforces.com/contest/734/problem/D Description Anton likes to play ...

随机推荐

  1. android studio run的时候一直卡在waiting for debug

    原因如下: 选择ok就可以,同时我们也可以从这里找到 平常遇到跟真机有关的问题,三步大法,1,插拔手机,2.adb kill-server;adb start-server 3.重启as

  2. linux解压

    tar –xvf file.tar //解压 tar包tar -xzvf file.tar.gz //解压tar.gztar -xjvf file.tar.bz2 //解压 tar.bz2tar –x ...

  3. mybatis mapper接口开发dao层

    本文将探讨使用 mapper接口,以及 pojo 包装类进行 dao 层基本开发 mybatis dao 层开发只写 mapper 接口 其中需要 开发的接口实现一些开发规范 1. UserMappe ...

  4. js 奇葩技巧之隐藏代码

    昨天在群看到有人发了个文章叫<“短”化你的代码>,思路非常不错,采用unicode的零宽字符来实现字符隐藏,虽然有字符,可是你却看不见它.这篇文章详细的介绍了这种方法的实现原理,最后还给出 ...

  5. html5 canvas贝塞尔曲线篇(上)

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  6. mysql内连接、左连接、右连接

    内连接(INNER JOIN)(典型的连接运算,使用像   =   或   <>   之类的比较运算符).包括相等连接和自然连接. 内连接使用比较运算符根据每个表共有的列的值匹配两个表中的 ...

  7. 通俗理解决策树中的熵&条件熵&信息增益

    参考通俗理解决策树算法中的信息增益 说到决策树就要知道如下概念: 熵:表示一个随机变量的复杂性或者不确定性. 假如双十一我要剁手买一件衣服,但是我一直犹豫着要不要买,我决定买这件事的不确定性(熵)为2 ...

  8. 【CTF REVERSE】WHCTF2017-CRACKME

    1.前言 假装大学生水一下CTF题目,常规思路.程序没有加壳,是VC写的MFC程序. 2.破题思路 1.MessageBox 下断点 2.找到提示错误字符串的函数B 3.跟踪函数 4.跟踪算法 3.实 ...

  9. 005_ss-link.info的ping探测工具

    用小工具ping.py测试距离您最快的节点 #!/usr/bin/env python # coding: utf-8 """ A pure python ping im ...

  10. ckeditor:基本使用方法

    引用网址:http://blog.sina.com.cn/s/blog_6961ba9b0102wwye.html 1.获得值 var editor=CKEDITOR.replace( 'editor ...