結果
| 問題 |
No.113 宝探し
|
| コンテスト | |
| ユーザー |
kkkk97368086
|
| 提出日時 | 2021-12-03 09:55:14 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 332 bytes |
| コンパイル時間 | 1,451 ms |
| コンパイル使用メモリ | 167,596 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-05 13:49:05 |
| 合計ジャッジ時間 | 2,476 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 4 |
| other | AC * 1 WA * 22 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
int l = s.size();
int ud=0,lr=0;
for(int i=0; i<l; i++){
if(s[i]=='N') ud++;
if(s[i]=='S') ud--;
if(s[i]=='W') lr--;
if(s[i]=='E') lr++;
}
double x = sqrt(ud*ud+lr*lr);
printf("%.10f",&x);
}
kkkk97368086