首页 > 代码库 > Codeforces Round #368 (Div. 2)

Codeforces Round #368 (Div. 2)

A

技术分享
#include <iostream>#include <vector>#include <queue>#include <cstdio>#include <cstdlib>#include <cstring>#include <cctype>#include <algorithm>#include <map>#include <set>#include <cmath>using namespace std;typedef unsigned long long ull;char a[105][105];int main(){ //freopen("input.txt","r",stdin); //freopen("output.txt","w",stdout);   int n,m;   char c;   scanf("%d %d",&n,&m);   for(int i=0;i<n;i++)   for(int j=0;j<m;j++)   {    scanf("%c",&c);    if(c>=65)    a[i][j]=c;    else    j--;   }   int pop=0;   for(int i=0;i<=n&&pop==0;i++)  {   for(int j=0;j<m&&pop==0;j++)   {    if(i==n)    {     printf("#Black&White");     pop=1;     break;    }    if(a[i][j]!=W&&a[i][j]!=B&&a[i][j]!=G)    {     printf("#Color");     pop=1;    }   }  } //fclose(stdin); //fclose(stdout);}
View Code

B

Codeforces Round #368 (Div. 2)