Submission #89064

# Submission time Handle Problem Language Result Execution time Memory
89064 2018-12-10T09:22:59 Z temoyanteladze Experiments with Gorlum (IZhO13_expgorl) C++14
0 / 100
2 ms 256 KB
#include <bits/stdc++.h>
#define ll long long
#define x first
#define y second
using namespace std;
double func(double x1,double y1,double x2,double y2){
double db=(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2);
return sqrt(db);
};
int main() {
ll n;
string v;
cin>>n>>v;
double x1,y1,x2,y2;
cin>>x1>>y1;
cin>>x2>>y2;
double mn=10e7,mx=0;
for (ll i=0;i<v.size();i++)
{
    if(v[i]=='L')
        x2--;
    if (v[i]=='R')
        x2++;
    if (v[i]=='F')
        y2++;
    if (v[i]=='B')
        y2--;
  double t=func(x1,y1,x2,y2);
      mn=min(mn,t);
      mx=max(mx,t);
}
 
 
cout<<fixed<<setprecision(9)<<mn<<' '<<fixed<<setprecision(9)<<mx;
	return 0;
}

Compilation message

expgorl.cpp: In function 'int main()':
expgorl.cpp:18:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 for (ll i=0;i<v.size();i++)
             ~^~~~~~~~~
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -