結果
問題 | No.1806 Rotating Golem |
ユーザー |
|
提出日時 | 2022-01-14 21:25:45 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 281 bytes |
コンパイル時間 | 683 ms |
コンパイル使用メモリ | 76,928 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-20 07:44:20 |
合計ジャッジ時間 | 1,359 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 |
ソースコード
#include<iostream>int rot(char x) {if(x == 'E') return 0;if(x == 'W') return 2;if(x == 'N') return 1;return 3;}int main() {int x, y;char ch;std::cin >> ch;x = rot(ch);std::cin >> ch;y = rot(ch);std::cout << ((x - y) % 4 + 4) % 4 << '\n';}