struct T
{
char c[11];
}a[505];
int main()
{
int n,s=1,p,v=0,w=0,t=1,r=0,e=0;
scanf("%d",&n);
for(int i=0;i<n;i++)
scanf("%s",a[i].c);
for(int i=0;i<n;i++)
{
p=0;
t=1;
e=0;
if(a[i].c[0]=='r')
s+=1;
else if(a[i].c[0]=='l')
s-=1;
else
{
while(a[i].c[p]!='\0')
p++;
for(int k=p-1;k>=0;k--)
{
e+=(a[i].c[k]-'0')*t;
t*=10;
}
r=s+520;
r=r%4;
if(r==0)
v=v-e;
else if(r==1)
w=w+e;
else if(r==2)
v=v+e;
else if(r==3)
w=w-e;
printf("(%d,%d)\n",v,w);
}
}
getchar();
getchar();
return 0;
}
测试结果2: 通过本测试点|有效耗时47ms
测试结果3: 通过本测试点|有效耗时47ms
测试结果4: 输出过长|用户输出数据超过标准输出两倍[标准输出5位|选手输出225位]
测试结果5: 通过本测试点|有效耗时31ms
测试结果6: 通过本测试点|有效耗时31ms
测试结果7: 通过本测试点|有效耗时47ms
测试结果8: 通过本测试点|有效耗时47ms
测试结果9: 通过本测试点|有效耗时47ms
测试结果10:通过本测试点|有效耗时47ms