Submission #89024

#TimeUsernameProblemLanguageResultExecution timeMemory
89024mateExperiments with Gorlum (IZhO13_expgorl)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; int main() { string t,s; double k,lx,ly,gx,gy,i,j,m,n; cin >> k; cin >> s; cin >> lx >> ly; cin >> gx >> gy; double x=(lx-gx)*(lx-gx),y=(ly-gy)*(ly-gy); double dis=sqrt(x+y); double mx=dis,mn=dis; for (j==;j<n;j++) for (i=0;i<s.size();i++) { if (s[i]=='L') gx=gx-1; if (s[i]=='R') gx=gx+1; if (s[i]=='F') gy=gy+1; if (s[i]=='B') gy=gy-1; x=(lx-gx)*(lx-gx); y=(ly-gy)*(ly-gy); dis=sqrt(x+y); mx=max(mx,dis); mn=min(mn,dis); } cout << mn << " " << mx; }

Compilation message (stderr)

expgorl.cpp: In function 'int main()':
expgorl.cpp:18:13: error: expected primary-expression before ';' token
     for (j==;j<n;j++)
             ^
expgorl.cpp:9:30: warning: unused variable 'm' [-Wunused-variable]
     double k,lx,ly,gx,gy,i,j,m,n;
                              ^