結果
問題 |
No.1806 Rotating Golem
|
ユーザー |
|
提出日時 | 2022-03-13 16:55:58 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 504 bytes |
コンパイル時間 | 1,419 ms |
コンパイル使用メモリ | 165,596 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-19 00:08:28 |
合計ジャッジ時間 | 2,158 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 WA * 4 |
ソースコード
#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 == 'E') return 1; else if(x == 'W') return 3; else if(x == 'S') return 2; else return 4; } int main(void){ char a,b; cin >> a >> b; int ai = ch_int(a),bi = ch_int(b); cout << abs(ai-bi); }