#include #include #include #include using namespace std; #define rep(i,n) for(int i=0;i>c) { if (c == 'N') y++; else if (c == 'S') y--; else if (c == 'E') x++; else if (c == 'W') x--; } cout << fixed << setprecision(3) << sqrt(x*x + y*y) << endl; return 0; }