#include <stdio.h>
int main(void){
int n,a,b,d,i,j,o,ans=0;
char c;
scanf("%d%d%d\n",&n,&a,&b);
for (i=0;i<n;i++){
scanf("%c",&c);
if (c=='E') o=1;
else o=-1;
for (j=0;j<4;j++) scanf("%c",&c);
scanf("%d\n",&d);
if (d<a) d=a;
else if (d>b) d=b;
ans+=d*o;
}
if (ans>0) printf("East ");
else if (ans<0) printf("West ");
printf("%d\n",(ans>0)? ans:ans*(-1));
return 0;
}
./Main.cpp: In function ‘int main()’:
./Main.cpp:5:29: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d\n",&n,&a,&b);
^
./Main.cpp:7:19: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%c",&c);
^
./Main.cpp:10:37: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
for (j=0;j<4;j++) scanf("%c",&c);
^
./Main.cpp:11:21: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d\n",&d);
^