View Code of Problem 135

//服了 我是** 左右都分不清楚
#include<stdio.h>	
int main()
{
	int count;
	while(scanf("%d",&count)!=EOF)
	{
		int heng =0,shu=0;
		int n,m,a;
		char str;
		n = m =0;
		while(count--)
		{
			getchar();
			scanf("%c%d",&str,&a);
			switch(str)
			{
				case 'L':heng -= a;break;
				case 'R':heng += a;break;
				case 'F':shu += a;break;
				case 'B':shu -= a;break;
				default:break; 
			}
		}
		scanf("%d%d",&n,&m);
		if(n == heng&&m == shu)
			printf("MEME IS SO LUCKY\n");
		else
			printf("GPS ERROR\n");
	
	}		

	return 0;
 } 

Double click to view unformatted code.


Back to problem 135