結果
| 問題 | No.1806 Rotating Golem |
| コンテスト | |
| ユーザー |
eve__fuyuki
|
| 提出日時 | 2024-04-02 13:25:08 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 402 bytes |
| 記録 | |
| コンパイル時間 | 1,989 ms |
| コンパイル使用メモリ | 197,880 KB |
| 最終ジャッジ日時 | 2025-02-20 19:37:31 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 3 WA * 10 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
void fast_io() {
ios::sync_with_stdio(false);
std::cin.tie(nullptr);
}
int main() {
fast_io();
char a, b;
cin >> a >> b;
string s = {a, b};
sort(s.begin(), s.end());
if (a == b) {
cout << 0 << endl;
} else if (s == "NS" || s == "EW") {
cout << 1 << endl;
} else {
cout << 2 << endl;
}
}
eve__fuyuki