結果
| 問題 |
No.1806 Rotating Golem
|
| コンテスト | |
| ユーザー |
se1ka2
|
| 提出日時 | 2022-01-14 21:23:21 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 280 bytes |
| コンパイル時間 | 482 ms |
| コンパイル使用メモリ | 65,480 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-20 07:39:25 |
| 合計ジャッジ時間 | 1,125 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 |
ソースコード
#include <iostream>
using namespace std;
string p = "ESWN";
int main()
{
char a, b;
cin >> a >> b;
int ans = 0;
for(int i = 0; i < 4; i++){
if(a == p[i]) ans -= i;
if(b == p[i]) ans += i;
}
ans = (ans + 4) % 4;
cout << ans << endl;
}
se1ka2