|
|
back to boardDiscussion of Problem 1258. PoolI think this problem is simple but I got WA#14 Posted by Saturn 2 Jul 2004 23:22 I think this problem is simple but I got WA#14. var w,d:real; l:real; lx,ly,x0,y0,x1,y1:real; ch:char; begin readln(w,d); readln(x0,y0); readln(x1,y1); lx:=x0-x1; ly:=y0-y1; while not eof do begin read(ch); case upcase(ch) of 'L':lx:=lx+2*x1; 'R':lx:=lx+2*(w-x1); 'F':ly:=ly+2*y1; 'B':ly:=ly+2*(d-y1); end; end; l:=sqrt(lx*lx+ly*ly); write(l:0:4); end. Re: I think this problem is simple but I got WA#14 Posted by Saturn 8 Jul 2004 00:07 Oh AC now! Very stupid bug:) |
|
|