#include<iostream> #include<string> using namespace std; int main() { int a; while(cin>>a) { int l=0,r=0,f=0,b=0; string c; while(getline(cin,c)&&c!="0 0") { if(c[0]=='L')l=c[1]-'0'; else if(c[0]=='F')f=c[1]-'0'; else if(c[0]=='R')r=c[1]-'0'; else if(c[0]=='B')b=c[1]-'0'; } if(l==r&&f==b)cout<<"MEME IS SO LUCKY"<<endl; else cout<<"GPS ERROR"<<endl; } } |
Double click to view unformatted code.