結果
問題 |
No.113 宝探し
|
ユーザー |
![]() |
提出日時 | 2017-10-06 21:54:24 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 463 bytes |
コンパイル時間 | 785 ms |
コンパイル使用メモリ | 82,284 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-17 00:33:30 |
合計ジャッジ時間 | 1,761 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 4 |
other | WA * 23 |
ソースコード
#include <iostream> #include <cstdio> #include <vector> #include <map> #include <set> #include <algorithm> #include <string> #include <cstdlib> #include <stack> #include <queue> #include <cmath> using namespace std; int main() { char c; double x=0, y=0; while (cin>>c) { if (c == 'N')x++; else if (c == 'S') x--; else if (c == 'E')y++; else if (c == 'W')y--; cout << c << endl << x << endl << y << endl << endl; } printf("%f", sqrt(x*x + y*y)); }