回复 10楼 花泗少
beyondyf 1004 Accepted GCC 322B 4 ms 896 kB 2012-01-22 09:25:08 
#include <stdio.h> int main() { int n, r, i; char s[16]; while(scanf("%d", &n), n--) { scanf("%s", s); for(r = i = 0; i < n; r += (s[i++] == 'R')); printf("%s\n", (s[n] == 'B' && r == 7 || s[n] == 'L' && n - r < 7) ? "Red" : "Yellow"); } return 0; }

重剑无锋,大巧不工