結果
問題 |
No.1806 Rotating Golem
|
ユーザー |
|
提出日時 | 2022-03-13 17:05:55 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 484 bytes |
コンパイル時間 | 1,781 ms |
コンパイル使用メモリ | 164,872 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-19 00:19:07 |
合計ジャッジ時間 | 2,220 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 10 WA * 3 |
ソースコード
#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 << (abs(ch_int(b)-ch_int(a)))%4; }