题目:​​http://acm.hdu.edu.cn/showproblem.php?pid=2537​

#include <iostream>
using namespace std;
int main()
{
char a;
string s;
int n,red,yellow,c,d;
while(cin>>n,n)
{
yellow=red=0;
for(int i=0;i<n;i++)
{
cin>>a;
if(a=='Y') yellow++;
if(a=='R') red++;
}
if(a=='B'&&red==7)
s="Red";
if(a=='L'&&yellow<7)
s="Red";
if(a=='B'&&red<7)
s="Yellow";
if(a=='L'&&yellow==7)
s="Yellow";
cout<<s<<endl;
}
return 0;
}