結果
| 問題 |
No.1806 Rotating Golem
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-03-13 17:05:16 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 481 bytes |
| コンパイル時間 | 1,550 ms |
| コンパイル使用メモリ | 164,772 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-19 00:17:52 |
| 合計ジャッジ時間 | 1,993 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < n; i++)
#define srep(i,a,b) for(int i = a; i < b; i++)
#define all(A) (A).begin(),A.end()
#define MOD 1000000007
using namespace std;
using ll = long long;
using P = pair<char,int>;
using Graph = vector<vector<int>>;
int ch_int(char x){
if(x == 'N') return 0;
else if(x == 'E') return 1;
else if(x == 'S') return 2;
else return 3;
}
int main(void){
char a,b; cin >> a >> b;
cout << (ch_int(b)-ch_int(a)+4)%4;
}