結果
問題 | No.2322 MMA文字列 |
ユーザー |
|
提出日時 | 2025-03-31 19:04:06 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 340 bytes |
コンパイル時間 | 754 ms |
コンパイル使用メモリ | 78,588 KB |
実行使用メモリ | 7,324 KB |
最終ジャッジ日時 | 2025-03-31 19:04:08 |
合計ジャッジ時間 | 1,628 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 |
ソースコード
#include <iostream>#include <cstdint>using namespace std;static inline constexpr string solve(const string& S) noexcept{if (S[0] == S[1] && S[1] != S[2]) return "Yes"s;else return "No"s;}int main(){cin.tie(nullptr);ios::sync_with_stdio(false);string S;S.reserve(3);cin >> S;cout << solve(S) << '\n';return 0;}