結果
問題 | No.1806 Rotating Golem |
ユーザー |
![]() |
提出日時 | 2021-12-11 18:23:00 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 254 bytes |
コンパイル時間 | 937 ms |
コンパイル使用メモリ | 79,744 KB |
最終ジャッジ日時 | 2025-01-26 07:56:25 |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 |
ソースコード
#include <iostream>#include <map>using namespace std;int main(void) {string a; cin >> a;string b; cin >> b;map<string, int> mp;mp["N"] = 0; mp["E"] = 1; mp["S"] = 2; mp["W"] = 3;int ans = (mp[b] - mp[a] + 4) % 4;cout << ans << endl;}