标签:
#include<cstdio>
using namespace std;
int main(){
int x,g,y,r,t;
scanf("%d",&t);
while(t--){
scanf("%d%d%d%d",&x,&g,&y,&r);
x = x % (g+y+r);
if(x < g) puts("GREEN");
else if(x < g + y) puts("YELLOW");
else puts("RED");
}
return 0;
}
[2016-04-17][Gym][100947][A][Traffic Lights]
标签:
原文地址:http://www.cnblogs.com/qhy285571052/p/320db4f7fe30a3216ffb4f3a93019d3b.html