题目链接:

  http://codeforces.com/problemset/problem/707/A

题目大意:

  给一张N*M的图,只有六种颜色(如下),只含B,W,G的是黑白图,否则是彩色图。问这张图是什么图。

  • 'C' (cyan)
  • 'M' (magenta)
  • 'Y' (yellow)
  • 'W' (white)
  • 'G' (grey)
  • 'B' (black)

题目思路:

  【模拟】

  签到题。直接mark记一下是否出现彩色即可。

 //
//by coolxxx
//#include<bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<string>
#include<iomanip>
#include<map>
#include<memory.h>
#include<time.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
//#include<stdbool.h>
#include<math.h>
#define min(a,b) ((a)<(b)?(a):(b))
#define max(a,b) ((a)>(b)?(a):(b))
#define abs(a) ((a)>0?(a):(-(a)))
#define lowbit(a) (a&(-a))
#define sqr(a) ((a)*(a))
#define swap(a,b) ((a)^=(b),(b)^=(a),(a)^=(b))
#define mem(a,b) memset(a,b,sizeof(a))
#define eps (1e-8)
#define J 10
#define mod 1000000007
#define MAX 0x7f7f7f7f
#define PI 3.14159265358979323
#define N 104
using namespace std;
typedef long long LL;
int cas,cass;
int n,m,lll,ans;
char a[N][N];
bool mark;
int main()
{
#ifndef ONLINE_JUDGE
// freopen("1.txt","r",stdin);
// freopen("2.txt","w",stdout);
#endif
int i,j,k;
// for(scanf("%d",&cas);cas;cas--)
// for(scanf("%d",&cas),cass=1;cass<=cas;cass++)
// while(~scanf("%s",s+1))
while(~scanf("%d",&n))
{
mark=;
scanf("%d",&m);
for(i=;i<=n;i++)
{
for(j=;j<=m;j++)
{
cin>>a[i][j];
if(a[i][j]!='B' && a[i][j]!='W' && a[i][j]!='G')mark=;
}
}
if(mark)puts("#Color");
else puts("#Black&White");
}
return ;
}
/*
// //
*/

【模拟】Codeforces 707A Brain's Photos的更多相关文章

  1. CodeForces 707A Brain's Photos (水题)

    题意:给一张照片的像素,让你来确定是黑白的还是彩色的. 析:很简单么,如果有一种颜色不是黑白灰,那么就一定是彩色的. 代码如下: #pragma comment(linker, "/STAC ...

  2. CodeForces 707A Brain's Photos

    简单题. #pragma comment(linker, "/STACK:1024000000,1024000000") #include<cstdio> #inclu ...

  3. codeforces 707A A. Brain's Photos(水题)

    题目链接: A. Brain's Photos 题意: 问是黑白还是彩色; 思路: 没有思路: AC代码: #include <iostream> #include <cstdio& ...

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

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

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

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

  6. A. Brain's Photos ——Codeforces Round #368 (Div. 2)

    A. Brain's Photos time limit per test 2 seconds memory limit per test 256 megabytes input standard i ...

  7. 水题 CodeForces 137A Postcards and photos

    题目传送门 /* 水! */ #include <cstdio> #include <cstring> #include <algorithm> using nam ...

  8. 【Codeforces 707A】Brain's Photos 水题

    黑白灰都是#Black&White #include <cstdio> int n,m; int main() { scanf("%d%d",&n,&a ...

  9. codeforces707A:Brain's Photos

    Description Small, but very brave, mouse Brain was not accepted to summer school of young villains. ...

随机推荐

  1. HttpClient使用cookie

    import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Map; ...

  2. C#中区别多态、重载、重写的概念和语法结构

    C#中区别多态.重载.重写的概念和语法结构 重写是指重写基类的方法,在基类中的方法必须有修饰符virtual,而在子类的方法中必须指明override. 格式: 基类中: public virtual ...

  3. php100视频原始地址列表整理:

    php100视频原始地址列表整理: 教程名称 . 1:环境配置与代码调试 2:PHP的数据类型与源码调试 3:常用PHP运算类型介绍与应用 4: PHP条件语句介绍与应用 5:PHP循环语句的介绍与应 ...

  4. strut2.xml中result param详细设置

    1.Struts2.xml配置文件: 2.Jsp中:说明回调函数一个参数即可.把上面的俩个参数msg和page封装到一起了 3.msg是Action中全局变量 可参考:http://qiaolevip ...

  5. 一个初学者对CLSA.NET框架的使用心得

    什么是CSLA.NET框架? 今天在一个群里,有人问我什么是CSLA.NET,CSLA是Component-based, Scalable, Logical Architecture的简写,CSLA ...

  6. 纯命令行教你Cocoapods的安装和使用

    关于cocoapods的介绍和作用,网上有很多大神介绍的比我清楚,建议去看一下唐巧的http://blog.devtang.com/blog/2014/05/25/use-cocoapod-to-ma ...

  7. 【POJ2104】【整体二分+树状数组】区间第k大

    Description You are working for Macrohard company in data structures department. After failing your ...

  8. ios开发之UIImageView

    废话少说,直接进入正题!!! 1.创建一个UIImageView: 创建一个UIImageView对象的几种方法: UIImageView *imageView1 = [[UIImageView al ...

  9. spring Mvc json返回json的日期格式问题

    (一)输出json数据 springmvc中使用jackson-mapper-asl即可进行json输出,在配置上有几点: 1.使用mvc:annotation-driven 2.在依赖管理中添加ja ...

  10. yii2源码学习笔记(五)

    Event是所有事件类的基类.它封装了与事件相关的参数. yii2\base\Event.php <?php /** * @link http://www.yiiframework.com/ * ...