#include <bits/stdc++.h>
using namespace std;
long long int a,x,y,w,q,i,b,c,d,e,n=0;
string f;
int main()
{
cin>>a;
cin>>f;
cin>>w>>q;
cin>>x>>y;
i=sizeof(f);
for(c=1;c<=i;c++){
if(f[c]=='L'){
w=w-1;
}
if(f[c]=='R'){
w=w+1;
}
if(f[c]=='F'){
q=q+1;
}
if(f[c]=='B'){
q=q-1;
}
if(f[c]=='I');
}
n=max(w,x)-min(w,x);
e=max(y,q)-min(y,q);
cout<<e<<'.'<<"000000000000"<<" "<<n<<'.'<<"000000000000";
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
256 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |