結果
| 問題 |
No.1806 Rotating Golem
|
| コンテスト | |
| ユーザー |
srjywrdnprkt
|
| 提出日時 | 2023-05-25 00:11:11 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 455 bytes |
| コンパイル時間 | 878 ms |
| コンパイル使用メモリ | 111,964 KB |
| 最終ジャッジ日時 | 2025-02-13 04:43:07 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 |
ソースコード
#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;
}
srjywrdnprkt