結果

問題 No.1806 Rotating Golem
ユーザー srjywrdnprktsrjywrdnprkt
提出日時 2023-05-25 00:11:11
言語 C++17(gcc12)
(gcc 12.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 455 bytes
コンパイル時間 1,149 ms
コンパイル使用メモリ 115,216 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-23 23:37:37
合計ジャッジ時間 1,900 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <cmath>
#include <map>
#include <set>
#include <iomanip>
#include <queue>
#include <algorithm>
#include <numeric>
#include <deque>
#include <complex>
#include <cassert>

using namespace std;
using ll = long long;

int main(){

    map<char, int> mp = {{'N',0},{'E',1},{'S',2},{'W',3}};
    char a, b;
    cin >> a >> b;
    int c = mp[b]-mp[a];
    if (c < 0) c += 4;
    cout << c << endl;

    return 0;
}
0