제출 #89127

#제출 시각아이디문제언어결과실행 시간메모리
89127tarash117생물 실험 (IZhO13_expgorl)C++14
0 / 100
376 ms66560 KiB
#include<bits/stdc++.h> using namespace std; map<double,double>d; int main(){ ios_base::sync_with_stdio(time); cin.tie(0); int k;cin>>k; string s; cin>>s; double x1,x2,y1,y2; cin>>x1>>y1>>x2>>y2; d[0]=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)); int n=s.size(); for(int i=1;i<=k;i++){ for(int j=1;j<=n;j++){ if(s[j]=='L') x1-=1; if(s[j]=='R') x1+=1; if(s[j]=='F') y1+=1; if(s[j]=='B') y1-=1; d[(i-1)*n+j]==sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));} } int mn=INT_MAX,mx=-1; for(int i=0;i<=n*k;i++){ if(d[i]<=mn) mn=d[i]; if(d[i]>=mx) mx=d[i]; } cout<<fixed<<setprecision(10)<<mn<<' '; cout<<fixed<<setprecision(10)<<mx<<' '; return 0; }

컴파일 시 표준 에러 (stderr) 메시지

expgorl.cpp: In function 'int main()':
expgorl.cpp:5:32: warning: the address of 'time_t time(time_t*)' will never be NULL [-Waddress]
  ios_base::sync_with_stdio(time);
                                ^
expgorl.cpp:25:15: warning: value computed is not used [-Wunused-value]
   d[(i-1)*n+j]==sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));}
#Verdict Execution timeMemoryGrader output
Fetching results...